From 0424fdaf883a689d5185c0d0665b265373945898 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Mon, 17 Jun 2019 17:39:24 +0200 Subject: drm/prime: Actually remove DRIVER_PRIME everywhere Split out to make the functional changes stick out more. All places where DRIVER_PRIME was used have been removed in previous patches already. v2: amdgpu gained DRIVER_SYNCOBJ_TIMELINE. v3: amdgpu lost DRIVER_SYNCOBJ_TIMELINE. v4: Don't add a space in i915_drv.c (Sam) v5: Add note that previous patches removed all the DRIVER_PRIME users already (Emil). v6: Fixupe ingenic (new driver) while applying. Cc: Sam Ravnborg Reviewed-by: Emil Velikov Reviewed-by: Eric Anholt Signed-off-by: Daniel Vetter Cc: amd-gfx@lists.freedesktop.org Cc: etnaviv@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: lima@lists.freedesktop.org Cc: linux-amlogic@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-arm-msm@vger.kernel.org Cc: linux-aspeed@lists.ozlabs.org Cc: linux-renesas-soc@vger.kernel.org Cc: linux-rockchip@lists.infradead.org Cc: linux-samsung-soc@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com Cc: linux-tegra@vger.kernel.org Cc: nouveau@lists.freedesktop.org Cc: NXP Linux Team Cc: spice-devel@lists.freedesktop.org Cc: virtualization@lists.linux-foundation.org Cc: VMware Graphics Cc: xen-devel@lists.xenproject.org Link: https://patchwork.freedesktop.org/patch/msgid/20190617153924.414-1-daniel.vetter@ffwll.ch --- drivers/gpu/drm/qxl/qxl_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/gpu/drm/qxl/qxl_drv.c') diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index f33e349c4ec5..61e1ce16fc25 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -247,8 +247,7 @@ static struct pci_driver qxl_pci_driver = { }; static struct drm_driver qxl_driver = { - .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_PRIME | - DRIVER_ATOMIC, + .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC, .dumb_create = qxl_mode_dumb_create, .dumb_map_offset = qxl_mode_dumb_mmap, -- cgit v1.2.3 From baa78332a7ca01f72390d8fe7ade9b278ab7f5d4 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Fri, 14 Jun 2019 22:35:41 +0200 Subject: drm/qxl: Drop drm_gem_prime_export/import They're the default. Aside: Would be really nice to switch the others over to drm_gem_object_funcs. Reviewed-by: Eric Anholt Reviewed-by: Emil Velikov Acked-by: Gerd Hoffmann Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualization@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20190614203615.12639-26-daniel.vetter@ffwll.ch --- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/gpu/drm/qxl/qxl_drv.c') diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 61e1ce16fc25..d8f64886474b 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -256,8 +256,6 @@ static struct drm_driver qxl_driver = { #endif .prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_fd_to_handle = drm_gem_prime_fd_to_handle, - .gem_prime_export = drm_gem_prime_export, - .gem_prime_import = drm_gem_prime_import, .gem_prime_pin = qxl_gem_prime_pin, .gem_prime_unpin = qxl_gem_prime_unpin, .gem_prime_get_sg_table = qxl_gem_prime_get_sg_table, -- cgit v1.2.3 From c0f4b75c065ba2c6b9610f4526da9bf432049b9e Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Sun, 30 Jun 2019 08:18:58 +0200 Subject: drm/qxl: drop use of drmP.h Drop use of the deprecated drmP.h header file. While touching the files divided includes in blocks, and when needed sort the blocks. Fix fallout. Signed-off-by: Sam Ravnborg Acked-by: Gerd Hoffmann Acked-by: Emil Velikov Cc: Dave Airlie Cc: virtualization@lists.linux-foundation.org Cc: spice-devel@lists.freedesktop.org Link: https://patchwork.freedesktop.org/patch/msgid/20190630061922.7254-10-sam@ravnborg.org --- drivers/gpu/drm/qxl/qxl_cmd.c | 2 ++ drivers/gpu/drm/qxl/qxl_debugfs.c | 4 ++-- drivers/gpu/drm/qxl/qxl_display.c | 3 +++ drivers/gpu/drm/qxl/qxl_draw.c | 2 ++ drivers/gpu/drm/qxl/qxl_drv.c | 10 +++++++--- drivers/gpu/drm/qxl/qxl_drv.h | 7 +++---- drivers/gpu/drm/qxl/qxl_gem.c | 1 - drivers/gpu/drm/qxl/qxl_ioctl.c | 3 +++ drivers/gpu/drm/qxl/qxl_irq.c | 4 ++++ drivers/gpu/drm/qxl/qxl_kms.c | 9 ++++++--- drivers/gpu/drm/qxl/qxl_release.c | 6 +++++- drivers/gpu/drm/qxl/qxl_ttm.c | 16 +++++++++------- 12 files changed, 46 insertions(+), 21 deletions(-) (limited to 'drivers/gpu/drm/qxl/qxl_drv.c') diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c index 0a2e51af1230..ac1081f55b51 100644 --- a/drivers/gpu/drm/qxl/qxl_cmd.c +++ b/drivers/gpu/drm/qxl/qxl_cmd.c @@ -25,6 +25,8 @@ /* QXL cmd/ring handling */ +#include + #include #include "qxl_drv.h" diff --git a/drivers/gpu/drm/qxl/qxl_debugfs.c b/drivers/gpu/drm/qxl/qxl_debugfs.c index 118422549828..a85ec100b0cc 100644 --- a/drivers/gpu/drm/qxl/qxl_debugfs.c +++ b/drivers/gpu/drm/qxl/qxl_debugfs.c @@ -28,9 +28,9 @@ * Alon Levy */ -#include +#include +#include -#include #include "qxl_drv.h" #include "qxl_object.h" diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_display.c index 8b319ebbb0fb..023fb5a69af1 100644 --- a/drivers/gpu/drm/qxl/qxl_display.c +++ b/drivers/gpu/drm/qxl/qxl_display.c @@ -24,11 +24,14 @@ */ #include +#include + #include #include #include #include #include +#include #include "qxl_drv.h" #include "qxl_object.h" diff --git a/drivers/gpu/drm/qxl/qxl_draw.c b/drivers/gpu/drm/qxl/qxl_draw.c index 97c3f1a95a32..5bebf1ea1c5d 100644 --- a/drivers/gpu/drm/qxl/qxl_draw.c +++ b/drivers/gpu/drm/qxl/qxl_draw.c @@ -20,6 +20,8 @@ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include + #include "qxl_drv.h" #include "qxl_object.h" diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index d8f64886474b..b57a37543613 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -28,14 +28,18 @@ * Alon Levy */ -#include +#include "qxl_drv.h" #include +#include +#include -#include #include +#include +#include #include +#include #include -#include "qxl_drv.h" + #include "qxl_object.h" static const struct pci_device_id pciidlist[] = { diff --git a/drivers/gpu/drm/qxl/qxl_drv.h b/drivers/gpu/drm/qxl/qxl_drv.h index 2896bb6fdbf4..ae82e5fab09c 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.h +++ b/drivers/gpu/drm/qxl/qxl_drv.h @@ -31,22 +31,21 @@ */ #include -#include #include #include +#include #include #include #include +#include #include -#include +#include #include #include -/* just for ttm_validate_buffer */ #include #include #include -#include #include "qxl_dev.h" diff --git a/drivers/gpu/drm/qxl/qxl_gem.c b/drivers/gpu/drm/qxl/qxl_gem.c index 89606c819d82..89e4f9a7249c 100644 --- a/drivers/gpu/drm/qxl/qxl_gem.c +++ b/drivers/gpu/drm/qxl/qxl_gem.c @@ -23,7 +23,6 @@ * Alon Levy */ -#include #include #include "qxl_drv.h" diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c index d410e2925162..8117a45b3610 100644 --- a/drivers/gpu/drm/qxl/qxl_ioctl.c +++ b/drivers/gpu/drm/qxl/qxl_ioctl.c @@ -23,6 +23,9 @@ * Alon Levy */ +#include +#include + #include "qxl_drv.h" #include "qxl_object.h" diff --git a/drivers/gpu/drm/qxl/qxl_irq.c b/drivers/gpu/drm/qxl/qxl_irq.c index 3bb31add6350..8435af108632 100644 --- a/drivers/gpu/drm/qxl/qxl_irq.c +++ b/drivers/gpu/drm/qxl/qxl_irq.c @@ -23,6 +23,10 @@ * Alon Levy */ +#include + +#include + #include "qxl_drv.h" irqreturn_t qxl_irq_handler(int irq, void *arg) diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index bee61fa2c9bc..611cbe7aee69 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -23,11 +23,14 @@ * Alon Levy */ -#include "qxl_drv.h" -#include "qxl_object.h" +#include +#include +#include #include -#include + +#include "qxl_drv.h" +#include "qxl_object.h" int qxl_log_level; diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c index 49f9a9385393..b805bfa87b68 100644 --- a/drivers/gpu/drm/qxl/qxl_release.c +++ b/drivers/gpu/drm/qxl/qxl_release.c @@ -19,9 +19,13 @@ * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + +#include + +#include + #include "qxl_drv.h" #include "qxl_object.h" -#include /* * drawable cmd cache - allocate a bunch of VRAM pages, suballocate diff --git a/drivers/gpu/drm/qxl/qxl_ttm.c b/drivers/gpu/drm/qxl/qxl_ttm.c index 0234f8556ada..663e59fd1e8c 100644 --- a/drivers/gpu/drm/qxl/qxl_ttm.c +++ b/drivers/gpu/drm/qxl/qxl_ttm.c @@ -23,19 +23,21 @@ * Alon Levy */ +#include + +#include +#include +#include +#include #include #include -#include -#include #include -#include -#include -#include +#include +#include + #include "qxl_drv.h" #include "qxl_object.h" -#include - static struct qxl_device *qxl_get_qdev(struct ttm_bo_device *bdev) { struct qxl_mman *mman; -- cgit v1.2.3 From f6d2b63adb0a55e41ddbc0baa890c0c02858000d Mon Sep 17 00:00:00 2001 From: Chuhong Yuan Date: Tue, 23 Jul 2019 18:40:00 +0800 Subject: drm/qxl: Use dev_get_drvdata where possible Instead of using to_pci_dev + pci_get_drvdata, use dev_get_drvdata to make code simpler. Signed-off-by: Chuhong Yuan Link: http://patchwork.freedesktop.org/patch/msgid/20190723103959.4078-1-hslester96@gmail.com Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_drv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/drm/qxl/qxl_drv.c') diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index b57a37543613..c1802e01d9f6 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -210,16 +210,14 @@ static int qxl_pm_resume(struct device *dev) static int qxl_pm_thaw(struct device *dev) { - struct pci_dev *pdev = to_pci_dev(dev); - struct drm_device *drm_dev = pci_get_drvdata(pdev); + struct drm_device *drm_dev = dev_get_drvdata(dev); return qxl_drm_resume(drm_dev, true); } static int qxl_pm_freeze(struct device *dev) { - struct pci_dev *pdev = to_pci_dev(dev); - struct drm_device *drm_dev = pci_get_drvdata(pdev); + struct drm_device *drm_dev = dev_get_drvdata(dev); return qxl_drm_freeze(drm_dev); } -- cgit v1.2.3