From: Thomas Zimmermann <tzimmermann@suse.de>
To: airlied@linux.ie, daniel@ffwll.ch
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
dri-devel@lists.freedesktop.org,
virtualization@lists.linux-foundation.org,
amd-gfx@lists.freedesktop.org,
Thomas Zimmermann <tzimmermann@suse.de>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
spice-devel@lists.freedesktop.org,
intel-gvt-dev@lists.freedesktop.org
Subject: [PATCH v2 10/20] drm/i915/gt: Remove references to struct drm_device.pdev
Date: Tue, 1 Dec 2020 11:35:32 +0100 [thread overview]
Message-ID: <20201201103542.2182-11-tzimmermann@suse.de> (raw)
In-Reply-To: <20201201103542.2182-1-tzimmermann@suse.de>
Using struct drm_device.pdev is deprecated. Convert i915 to struct
drm_device.dev. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +-
drivers/gpu/drm/i915/gt/intel_ggtt.c | 10 +++++-----
drivers/gpu/drm/i915/gt/intel_ppgtt.c | 2 +-
drivers/gpu/drm/i915/gt/intel_rc6.c | 4 ++--
drivers/gpu/drm/i915/gt/intel_reset.c | 6 +++---
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index d4e988b2816a..71bd2e22e7c6 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -1228,7 +1228,7 @@ bool intel_engine_is_idle(struct intel_engine_cs *engine)
/* Waiting to drain ELSP? */
if (execlists_active(&engine->execlists)) {
- synchronize_hardirq(engine->i915->drm.pdev->irq);
+ synchronize_hardirq(to_pci_dev(engine->i915->drm.dev)->irq);
intel_engine_flush_submission(engine);
diff --git a/drivers/gpu/drm/i915/gt/intel_ggtt.c b/drivers/gpu/drm/i915/gt/intel_ggtt.c
index cf94525be2c1..591c6a2a0a8f 100644
--- a/drivers/gpu/drm/i915/gt/intel_ggtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_ggtt.c
@@ -760,7 +760,7 @@ static unsigned int chv_get_total_gtt_size(u16 gmch_ctrl)
static int ggtt_probe_common(struct i915_ggtt *ggtt, u64 size)
{
struct drm_i915_private *i915 = ggtt->vm.i915;
- struct pci_dev *pdev = i915->drm.pdev;
+ struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
phys_addr_t phys_addr;
int ret;
@@ -830,7 +830,7 @@ static struct resource pci_resource(struct pci_dev *pdev, int bar)
static int gen8_gmch_probe(struct i915_ggtt *ggtt)
{
struct drm_i915_private *i915 = ggtt->vm.i915;
- struct pci_dev *pdev = i915->drm.pdev;
+ struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
unsigned int size;
u16 snb_gmch_ctl;
@@ -974,7 +974,7 @@ static u64 iris_pte_encode(dma_addr_t addr,
static int gen6_gmch_probe(struct i915_ggtt *ggtt)
{
struct drm_i915_private *i915 = ggtt->vm.i915;
- struct pci_dev *pdev = i915->drm.pdev;
+ struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
unsigned int size;
u16 snb_gmch_ctl;
@@ -1037,7 +1037,7 @@ static int i915_gmch_probe(struct i915_ggtt *ggtt)
phys_addr_t gmadr_base;
int ret;
- ret = intel_gmch_probe(i915->bridge_dev, i915->drm.pdev, NULL);
+ ret = intel_gmch_probe(i915->bridge_dev, to_pci_dev(i915->drm.dev), NULL);
if (!ret) {
drm_err(&i915->drm, "failed to set up gmch\n");
return -EIO;
@@ -1077,7 +1077,7 @@ static int ggtt_probe_hw(struct i915_ggtt *ggtt, struct intel_gt *gt)
ggtt->vm.gt = gt;
ggtt->vm.i915 = i915;
- ggtt->vm.dma = &i915->drm.pdev->dev;
+ ggtt->vm.dma = i915->drm.dev;
if (INTEL_GEN(i915) <= 5)
ret = i915_gmch_probe(ggtt);
diff --git a/drivers/gpu/drm/i915/gt/intel_ppgtt.c b/drivers/gpu/drm/i915/gt/intel_ppgtt.c
index 46d9aceda64c..01b7d08532f2 100644
--- a/drivers/gpu/drm/i915/gt/intel_ppgtt.c
+++ b/drivers/gpu/drm/i915/gt/intel_ppgtt.c
@@ -301,7 +301,7 @@ void ppgtt_init(struct i915_ppgtt *ppgtt, struct intel_gt *gt)
ppgtt->vm.gt = gt;
ppgtt->vm.i915 = i915;
- ppgtt->vm.dma = &i915->drm.pdev->dev;
+ ppgtt->vm.dma = i915->drm.dev;
ppgtt->vm.total = BIT_ULL(INTEL_INFO(i915)->ppgtt_size);
i915_address_space_init(&ppgtt->vm, VM_CLASS_PPGTT);
diff --git a/drivers/gpu/drm/i915/gt/intel_rc6.c b/drivers/gpu/drm/i915/gt/intel_rc6.c
index d7b8e4457fc2..cce53fb9589c 100644
--- a/drivers/gpu/drm/i915/gt/intel_rc6.c
+++ b/drivers/gpu/drm/i915/gt/intel_rc6.c
@@ -485,14 +485,14 @@ static bool rc6_supported(struct intel_rc6 *rc6)
static void rpm_get(struct intel_rc6 *rc6)
{
GEM_BUG_ON(rc6->wakeref);
- pm_runtime_get_sync(&rc6_to_i915(rc6)->drm.pdev->dev);
+ pm_runtime_get_sync(rc6_to_i915(rc6)->drm.dev);
rc6->wakeref = true;
}
static void rpm_put(struct intel_rc6 *rc6)
{
GEM_BUG_ON(!rc6->wakeref);
- pm_runtime_put(&rc6_to_i915(rc6)->drm.pdev->dev);
+ pm_runtime_put(rc6_to_i915(rc6)->drm.dev);
rc6->wakeref = false;
}
diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c
index 3654c955e6be..a49faf4ec139 100644
--- a/drivers/gpu/drm/i915/gt/intel_reset.c
+++ b/drivers/gpu/drm/i915/gt/intel_reset.c
@@ -180,7 +180,7 @@ static int i915_do_reset(struct intel_gt *gt,
intel_engine_mask_t engine_mask,
unsigned int retry)
{
- struct pci_dev *pdev = gt->i915->drm.pdev;
+ struct pci_dev *pdev = to_pci_dev(gt->i915->drm.dev);
int err;
/* Assert reset for at least 20 usec, and wait for acknowledgement. */
@@ -209,7 +209,7 @@ static int g33_do_reset(struct intel_gt *gt,
intel_engine_mask_t engine_mask,
unsigned int retry)
{
- struct pci_dev *pdev = gt->i915->drm.pdev;
+ struct pci_dev *pdev = to_pci_dev(gt->i915->drm.dev);
pci_write_config_byte(pdev, I915_GDRST, GRDOM_RESET_ENABLE);
return wait_for_atomic(g4x_reset_complete(pdev), 50);
@@ -219,7 +219,7 @@ static int g4x_do_reset(struct intel_gt *gt,
intel_engine_mask_t engine_mask,
unsigned int retry)
{
- struct pci_dev *pdev = gt->i915->drm.pdev;
+ struct pci_dev *pdev = to_pci_dev(gt->i915->drm.dev);
struct intel_uncore *uncore = gt->uncore;
int ret;
--
2.29.2
next prev 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 ` Thomas Zimmermann [this message]
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 ` [PATCH v2 14/20] drm/qxl: " Thomas Zimmermann
[not found] ` <20201201103542.2182-15-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-12-02 8:11 ` 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-11-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=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=nouveau@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
--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