Nouveau Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@linux.ie, daniel@ffwll.ch
Cc: Sam Ravnborg <sam@ravnborg.org>,
	nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org,
	amd-gfx@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	spice-devel@lists.freedesktop.org,
	intel-gvt-dev@lists.freedesktop.org
Subject: [PATCH v2 14/20] drm/qxl: Remove references to struct drm_device.pdev
Date: Tue,  1 Dec 2020 11:35:36 +0100	[thread overview]
Message-ID: <20201201103542.2182-15-tzimmermann@suse.de> (raw)
In-Reply-To: <20201201103542.2182-1-tzimmermann@suse.de>

Using struct drm_device.pdev is deprecated. Convert qxl to struct
drm_device.dev. No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
---
 drivers/gpu/drm/qxl/qxl_drv.c   | 2 +-
 drivers/gpu/drm/qxl/qxl_ioctl.c | 3 ++-
 drivers/gpu/drm/qxl/qxl_irq.c   | 3 ++-
 drivers/gpu/drm/qxl/qxl_kms.c   | 1 -
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index 6e7f16f4cec7..fb5f6a5e81d7 100644
--- a/drivers/gpu/drm/qxl/qxl_drv.c
+++ b/drivers/gpu/drm/qxl/qxl_drv.c
@@ -163,7 +163,7 @@ DEFINE_DRM_GEM_FOPS(qxl_fops);
 
 static int qxl_drm_freeze(struct drm_device *dev)
 {
-	struct pci_dev *pdev = dev->pdev;
+	struct pci_dev *pdev = to_pci_dev(dev->dev);
 	struct qxl_device *qdev = to_qxl(dev);
 	int ret;
 
diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c
index 16e1e589508e..b6075f452b9e 100644
--- a/drivers/gpu/drm/qxl/qxl_ioctl.c
+++ b/drivers/gpu/drm/qxl/qxl_ioctl.c
@@ -370,13 +370,14 @@ static int qxl_clientcap_ioctl(struct drm_device *dev, void *data,
 				  struct drm_file *file_priv)
 {
 	struct qxl_device *qdev = to_qxl(dev);
+	struct pci_dev *pdev = to_pci_dev(dev->dev);
 	struct drm_qxl_clientcap *param = data;
 	int byte, idx;
 
 	byte = param->index / 8;
 	idx = param->index % 8;
 
-	if (dev->pdev->revision < 4)
+	if (pdev->revision < 4)
 		return -ENOSYS;
 
 	if (byte >= 58)
diff --git a/drivers/gpu/drm/qxl/qxl_irq.c b/drivers/gpu/drm/qxl/qxl_irq.c
index 1ba5a702d763..ddf6588a2a38 100644
--- a/drivers/gpu/drm/qxl/qxl_irq.c
+++ b/drivers/gpu/drm/qxl/qxl_irq.c
@@ -81,6 +81,7 @@ static void qxl_client_monitors_config_work_func(struct work_struct *work)
 
 int qxl_irq_init(struct qxl_device *qdev)
 {
+	struct pci_dev *pdev = to_pci_dev(qdev->ddev.dev);
 	int ret;
 
 	init_waitqueue_head(&qdev->display_event);
@@ -93,7 +94,7 @@ int qxl_irq_init(struct qxl_device *qdev)
 	atomic_set(&qdev->irq_received_cursor, 0);
 	atomic_set(&qdev->irq_received_io_cmd, 0);
 	qdev->irq_received_error = 0;
-	ret = drm_irq_install(&qdev->ddev, qdev->ddev.pdev->irq);
+	ret = drm_irq_install(&qdev->ddev, pdev->irq);
 	qdev->ram_header->int_mask = QXL_INTERRUPT_MASK;
 	if (unlikely(ret != 0)) {
 		DRM_ERROR("Failed installing irq: %d\n", ret);
diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c
index 228e2b9198f1..4a60a52ab62e 100644
--- a/drivers/gpu/drm/qxl/qxl_kms.c
+++ b/drivers/gpu/drm/qxl/qxl_kms.c
@@ -111,7 +111,6 @@ int qxl_device_init(struct qxl_device *qdev,
 {
 	int r, sb;
 
-	qdev->ddev.pdev = pdev;
 	pci_set_drvdata(pdev, &qdev->ddev);
 
 	mutex_init(&qdev->gem.mutex);
-- 
2.29.2

  parent reply	other threads:[~2020-12-01 10:35 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-01 10:35 [PATCH v2 00/20] drm: Move struct drm_device.pdev to legacy Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 01/20] drm/amdgpu: Fix trailing whitespaces Thomas Zimmermann
     [not found]   ` <20201201103542.2182-2-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-12-01 10:40     ` Christian König
2020-12-02  7:59       ` Thomas Zimmermann
     [not found]         ` <63150504-fda0-48fd-9ecd-fb19ea0ae9d7-l3A5Bk7waGM@public.gmane.org>
2020-12-02  8:43           ` Christian König
     [not found]             ` <997ad04d-2acb-1dfb-0733-78f79a45b453-5C7GfCeVMHo@public.gmane.org>
2020-12-02  8:52               ` Thomas Zimmermann
     [not found]                 ` <99ce8db3-a53f-7432-6e05-428c414174a2-l3A5Bk7waGM@public.gmane.org>
2020-12-02 14:02                   ` Alex Deucher
     [not found]                     ` <CADnq5_O6X_kbdT8ZTzL1P35wgauVNc77voWf97LogDJXia5VTg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-12-02 14:28                       ` Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 02/20] drm/amdgpu: Remove references to struct drm_device.pdev Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 03/20] drm/ast: " Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 04/20] drm/bochs: " Thomas Zimmermann
     [not found]   ` <20201201103542.2182-5-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-12-02  8:10     ` Gerd Hoffmann
2020-12-01 10:35 ` [PATCH v2 05/20] drm/cirrus: " Thomas Zimmermann
2020-12-02  8:10   ` Gerd Hoffmann
2020-12-01 10:35 ` [PATCH v2 06/20] drm/gma500: Fix trailing whitespaces Thomas Zimmermann
     [not found] ` <20201201103542.2182-1-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-12-01 10:35   ` [PATCH v2 07/20] drm/gma500: Remove references to struct drm_device.pdev Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 08/20] drm/hibmc: " Thomas Zimmermann
2020-12-02  0:42   ` tiantao (H)
2020-12-01 10:35 ` [PATCH v2 09/20] drm/i915: " Thomas Zimmermann
     [not found]   ` <20201201103542.2182-10-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-12-08  7:59     ` Thomas Zimmermann
2020-12-10  9:03       ` Jani Nikula
     [not found]         ` <875z5a9gns.fsf-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2020-12-10  9:24           ` Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 10/20] drm/i915/gt: " Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 11/20] drm/i915/gvt: " Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 12/20] drm/mgag200: " Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 13/20] drm/nouveau: " Thomas Zimmermann
     [not found]   ` <20201201103542.2182-14-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-12-08  8:00     ` Thomas Zimmermann
2020-12-09 18:04   ` Jeremy Cline
2020-12-10  7:56     ` Thomas Zimmermann
     [not found]       ` <c018ff5d-7305-4de6-cf04-bfe6e29f7800-l3A5Bk7waGM@public.gmane.org>
2020-12-10 14:25         ` Jeremy Cline
2020-12-01 10:35 ` Thomas Zimmermann [this message]
     [not found]   ` <20201201103542.2182-15-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-12-02  8:11     ` [PATCH v2 14/20] drm/qxl: " Gerd Hoffmann
2020-12-01 10:35 ` [PATCH v2 15/20] drm/radeon: Fix trailing whitespaces Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 16/20] drm/radeon: Remove references to struct drm_device.pdev Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 17/20] drm/vboxvideo: " Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 18/20] drm/virtgpu: " Thomas Zimmermann
     [not found]   ` <20201201103542.2182-19-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-12-02  8:12     ` Gerd Hoffmann
2020-12-01 10:35 ` [PATCH v2 19/20] drm/vmwgfx: " Thomas Zimmermann
2020-12-01 10:35 ` [PATCH v2 20/20] drm: Upcast struct drm_device.dev to struct pci_device; replace pdev Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201201103542.2182-15-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-gvt-dev@lists.freedesktop.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=sam@ravnborg.org \
    --cc=spice-devel@lists.freedesktop.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox