dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v8 0/5] drm: Move struct drm_device.pdev to legacy
@ 2021-04-29 10:50 Thomas Zimmermann
  2021-04-29 10:50 ` [PATCH v8 1/5] drm/ast: Remove reference to struct drm_device.pdev Thomas Zimmermann
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2021-04-29 10:50 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel, chris
  Cc: intel-gfx, Thomas Zimmermann, dri-devel

V8 of the patchset fixes more bitrot and some commit messages.

The pdev field in struct drm_device points to a PCI device structure and
goes back to UMS-only days when all DRM drivers were for PCI devices.
Meanwhile we also support USB, SPI and platform devices. Each of those
uses the generic device stored in struct drm_device.dev.

To reduce duplication and remove the special case of PCI, this patchset
converts all modesetting drivers from pdev to dev and makes pdev a field
for legacy UMS drivers.

For PCI devices, the pointer in struct drm_device.dev can be upcasted to
struct pci_device; or tested for PCI with dev_is_pci(). In several places
the code can use the dev field directly.

After converting all drivers and the DRM core, the pdev fields becomes
only relevant for legacy drivers. In a later patchset, we may want to
convert these as well and remove pdev entirely.

v8:
	* fix pdev bitrot in ast
	* fix commit messages (Michael)
v7:
	* fix instances of pdev that have benn added under i915/
v6:
	* also remove assignment in i915/selftests in later patch (Chris)
v5:
	* remove assignment in later patch (Chris)
v4:
	* merged several patches
	* moved core changes into separate patch
	* vmwgfx build fix
v3:
	* merged several patches
	* fix one pdev reference in nouveau (Jeremy)
	* rebases
v2:
	* move whitespace fixes into separate patches (Alex, Sam)
	* move i915 gt/ and gvt/ changes into separate patches (Joonas)

Thomas Zimmermann (5):
  drm/ast: Remove reference to struct drm_device.pdev
  drm/i915/gt: Remove reference to struct drm_device.pdev
  drm/i915: Remove reference to struct drm_device.pdev
  drm/i915: Don't assign to struct drm_device.pdev
  drm: Move struct drm_device.pdev to legacy section

 drivers/gpu/drm/ast/ast_main.c                   | 1 -
 drivers/gpu/drm/i915/gt/intel_region_lmem.c      | 2 +-
 drivers/gpu/drm/i915/i915_drv.c                  | 1 -
 drivers/gpu/drm/i915/intel_runtime_pm.h          | 2 +-
 drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 -
 include/drm/drm_device.h                         | 6 +++---
 6 files changed, 5 insertions(+), 8 deletions(-)


base-commit: bf25e1addaf44137e20ce95de72ff118b37d808c
prerequisite-patch-id: c2b2f08f0eccc9f5df0c0da49fa1d36267deb11d
prerequisite-patch-id: c67e5d886a47b7d0266d81100837557fda34cb24
prerequisite-patch-id: c59ca2ddb182af06006fa360ad3e90fe16b93d3a
--
2.31.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v8 1/5] drm/ast: Remove reference to struct drm_device.pdev
  2021-04-29 10:50 [PATCH v8 0/5] drm: Move struct drm_device.pdev to legacy Thomas Zimmermann
@ 2021-04-29 10:50 ` Thomas Zimmermann
  2021-04-29 16:04   ` Ruhl, Michael J
  2021-04-29 10:50 ` [PATCH v8 2/5] drm/i915/gt: " Thomas Zimmermann
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Thomas Zimmermann @ 2021-04-29 10:50 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel, chris
  Cc: kernel test robot, intel-gfx, dri-devel, Thomas Zimmermann, Dave Airlie

Using struct drm_device.pdev is deprecated. Upcast with to_pci_dev()
from struct drm_device.dev to get the PCI device structure.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: ba4e0339a6a3 ("drm/ast: Fixed CVE for DP501")
Cc: KuoHsiang Chou <kuohsiang_chou@aspeedtech.com>
Cc: kernel test robot <lkp@intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Dave Airlie <airlied@redhat.com>
Cc: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/ast/ast_main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
index 189d783f6e2c..6b49a92dc75f 100644
--- a/drivers/gpu/drm/ast/ast_main.c
+++ b/drivers/gpu/drm/ast/ast_main.c
@@ -411,7 +411,6 @@ struct ast_private *ast_device_create(const struct drm_driver *drv,
 		return ast;
 	dev = &ast->base;
 
-	dev->pdev = pdev;
 	pci_set_drvdata(pdev, dev);
 
 	ast->regs = pcim_iomap(pdev, 1, 0);
-- 
2.31.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v8 2/5] drm/i915/gt: Remove reference to struct drm_device.pdev
  2021-04-29 10:50 [PATCH v8 0/5] drm: Move struct drm_device.pdev to legacy Thomas Zimmermann
  2021-04-29 10:50 ` [PATCH v8 1/5] drm/ast: Remove reference to struct drm_device.pdev Thomas Zimmermann
@ 2021-04-29 10:50 ` Thomas Zimmermann
  2021-04-29 16:02   ` [Intel-gfx] " Ruhl, Michael J
  2021-04-29 10:50 ` [PATCH v8 3/5] drm/i915: " Thomas Zimmermann
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 10+ messages in thread
From: Thomas Zimmermann @ 2021-04-29 10:50 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel, chris
  Cc: Michał Winiarski, Tvrtko Ursulin, Jani Nikula,
	Daniel Vetter, intel-gfx, Lucas De Marchi, dri-devel,
	Venkata Sandeep Dhanalakota, Daniele Ceraolo Spurio,
	Matthew Auld, Thomas Zimmermann, Mika Kuoppala

References to struct drm_device.pdev should not be used any longer as
the field will be moved into the struct's legacy section. Add a fix
for the rsp commit.

v8:
	* fix commit message (Michael)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: a50ca39fbd01 ("drm/i915: setup the LMEM region")
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
Cc: "Michał Winiarski" <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/gt/intel_region_lmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_region_lmem.c b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
index be6f2c8f5184..73fceb0c25fc 100644
--- a/drivers/gpu/drm/i915/gt/intel_region_lmem.c
+++ b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
@@ -177,7 +177,7 @@ static struct intel_memory_region *setup_lmem(struct intel_gt *gt)
 {
 	struct drm_i915_private *i915 = gt->i915;
 	struct intel_uncore *uncore = gt->uncore;
-	struct pci_dev *pdev = i915->drm.pdev;
+	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
 	struct intel_memory_region *mem;
 	resource_size_t io_start;
 	resource_size_t lmem_size;
-- 
2.31.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v8 3/5] drm/i915: Remove reference to struct drm_device.pdev
  2021-04-29 10:50 [PATCH v8 0/5] drm: Move struct drm_device.pdev to legacy Thomas Zimmermann
  2021-04-29 10:50 ` [PATCH v8 1/5] drm/ast: Remove reference to struct drm_device.pdev Thomas Zimmermann
  2021-04-29 10:50 ` [PATCH v8 2/5] drm/i915/gt: " Thomas Zimmermann
@ 2021-04-29 10:50 ` Thomas Zimmermann
  2021-04-29 16:03   ` Ruhl, Michael J
  2021-04-29 10:51 ` [PATCH v8 4/5] drm/i915: Don't assign " Thomas Zimmermann
  2021-04-29 10:51 ` [PATCH v8 5/5] drm: Move struct drm_device.pdev to legacy section Thomas Zimmermann
  4 siblings, 1 reply; 10+ messages in thread
From: Thomas Zimmermann @ 2021-04-29 10:50 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel, chris
  Cc: intel-gfx, Thomas Zimmermann, dri-devel

References to struct drm_device.pdev should not be used any longer as
the field will be moved into the struct's legacy section. Fix a rsp
comment.

v8:
	* fix commit message (Michael)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/i915/intel_runtime_pm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.h b/drivers/gpu/drm/i915/intel_runtime_pm.h
index 1e4ddd11c12b..183ea2b187fe 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.h
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.h
@@ -49,7 +49,7 @@ enum i915_drm_suspend_mode {
  */
 struct intel_runtime_pm {
 	atomic_t wakeref_count;
-	struct device *kdev; /* points to i915->drm.pdev->dev */
+	struct device *kdev; /* points to i915->drm.dev */
 	bool available;
 	bool suspended;
 	bool irqs_enabled;
-- 
2.31.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v8 4/5] drm/i915: Don't assign to struct drm_device.pdev
  2021-04-29 10:50 [PATCH v8 0/5] drm: Move struct drm_device.pdev to legacy Thomas Zimmermann
                   ` (2 preceding siblings ...)
  2021-04-29 10:50 ` [PATCH v8 3/5] drm/i915: " Thomas Zimmermann
@ 2021-04-29 10:51 ` Thomas Zimmermann
  2021-04-29 10:51 ` [PATCH v8 5/5] drm: Move struct drm_device.pdev to legacy section Thomas Zimmermann
  4 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2021-04-29 10:51 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel, chris
  Cc: intel-gfx, Thomas Zimmermann, dri-devel

Using struct drm_device.pdev is deprecated. Don't assign it. Users
should upcast from struct drm_device.dev.

v6:
	* also fix the assignment in selftests in this patch (Chris)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
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/i915_drv.c                  | 1 -
 drivers/gpu/drm/i915/selftests/mock_gem_device.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 785dcf20c77b..db513f93f0f5 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -758,7 +758,6 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (IS_ERR(i915))
 		return i915;
 
-	i915->drm.pdev = pdev;
 	pci_set_drvdata(pdev, i915);
 
 	/* Device parameters start as a copy of module parameters. */
diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
index 2ffc763fe90d..cf40004bc92a 100644
--- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c
+++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c
@@ -146,7 +146,6 @@ struct drm_i915_private *mock_gem_device(void)
 	}
 
 	pci_set_drvdata(pdev, i915);
-	i915->drm.pdev = pdev;
 
 	dev_pm_domain_set(&pdev->dev, &pm_domain);
 	pm_runtime_enable(&pdev->dev);
-- 
2.31.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v8 5/5] drm: Move struct drm_device.pdev to legacy section
  2021-04-29 10:50 [PATCH v8 0/5] drm: Move struct drm_device.pdev to legacy Thomas Zimmermann
                   ` (3 preceding siblings ...)
  2021-04-29 10:51 ` [PATCH v8 4/5] drm/i915: Don't assign " Thomas Zimmermann
@ 2021-04-29 10:51 ` Thomas Zimmermann
  4 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2021-04-29 10:51 UTC (permalink / raw)
  To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel, chris
  Cc: intel-gfx, Sam Ravnborg, Thomas Zimmermann, dri-devel

Struct drm_device.pdev is being moved to legacy status as only legacy
DRM drivers use it. A possible follow-up patchset could remove pdev
entirely.

v4:
	* rebased

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
---
 include/drm/drm_device.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
index d647223e8390..c5a195676e8f 100644
--- a/include/drm/drm_device.h
+++ b/include/drm/drm_device.h
@@ -279,9 +279,6 @@ struct drm_device {
 	/** @agp: AGP data */
 	struct drm_agp_head *agp;
 
-	/** @pdev: PCI device structure */
-	struct pci_dev *pdev;
-
 	/** @num_crtcs: Number of CRTCs on this device */
 	unsigned int num_crtcs;
 
@@ -324,6 +321,9 @@ struct drm_device {
 	/* List of devices per driver for stealth attach cleanup */
 	struct list_head legacy_dev_list;
 
+	/* PCI device structure */
+	struct pci_dev *pdev;
+
 #ifdef __alpha__
 	/** @hose: PCI hose, only used on ALPHA platforms. */
 	struct pci_controller *hose;
-- 
2.31.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [Intel-gfx] [PATCH v8 2/5] drm/i915/gt: Remove reference to struct drm_device.pdev
  2021-04-29 10:50 ` [PATCH v8 2/5] drm/i915/gt: " Thomas Zimmermann
@ 2021-04-29 16:02   ` Ruhl, Michael J
  0 siblings, 0 replies; 10+ messages in thread
From: Ruhl, Michael J @ 2021-04-29 16:02 UTC (permalink / raw)
  To: Thomas Zimmermann, jani.nikula, joonas.lahtinen, Vivi, Rodrigo,
	airlied, daniel, chris
  Cc: Winiarski, Michal, Nikula, Jani, Daniel Vetter, intel-gfx,
	De Marchi, Lucas, dri-devel, Auld, Matthew

>-----Original Message-----
>From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of
>Thomas Zimmermann
>Sent: Thursday, April 29, 2021 6:51 AM
>To: jani.nikula@linux.intel.com; joonas.lahtinen@linux.intel.com; Vivi, Rodrigo
><rodrigo.vivi@intel.com>; airlied@linux.ie; daniel@ffwll.ch; chris@chris-
>wilson.co.uk
>Cc: Winiarski, Michal <michal.winiarski@intel.com>; Nikula, Jani
><jani.nikula@intel.com>; Daniel Vetter <daniel.vetter@ffwll.ch>; intel-
>gfx@lists.freedesktop.org; De Marchi, Lucas <lucas.demarchi@intel.com>; dri-
>devel@lists.freedesktop.org; Auld, Matthew <matthew.auld@intel.com>;
>Thomas Zimmermann <tzimmermann@suse.de>
>Subject: [Intel-gfx] [PATCH v8 2/5] drm/i915/gt: Remove reference to struct
>drm_device.pdev
>
>References to struct drm_device.pdev should not be used any longer as
>the field will be moved into the struct's legacy section. Add a fix
>for the rsp commit.
>
>v8:
>	* fix commit message (Michael)

Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>

m

>Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>Fixes: a50ca39fbd01 ("drm/i915: setup the LMEM region")
>Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
>Cc: Matthew Auld <matthew.auld@intel.com>
>Cc: Jani Nikula <jani.nikula@intel.com>
>Cc: Chris Wilson <chris@chris-wilson.co.uk>
>Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
>Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
>Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>Cc: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@intel.com>
>Cc: "Michał Winiarski" <michal.winiarski@intel.com>
>---
> drivers/gpu/drm/i915/gt/intel_region_lmem.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/i915/gt/intel_region_lmem.c
>b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
>index be6f2c8f5184..73fceb0c25fc 100644
>--- a/drivers/gpu/drm/i915/gt/intel_region_lmem.c
>+++ b/drivers/gpu/drm/i915/gt/intel_region_lmem.c
>@@ -177,7 +177,7 @@ static struct intel_memory_region
>*setup_lmem(struct intel_gt *gt)
> {
> 	struct drm_i915_private *i915 = gt->i915;
> 	struct intel_uncore *uncore = gt->uncore;
>-	struct pci_dev *pdev = i915->drm.pdev;
>+	struct pci_dev *pdev = to_pci_dev(i915->drm.dev);
> 	struct intel_memory_region *mem;
> 	resource_size_t io_start;
> 	resource_size_t lmem_size;
>--
>2.31.1
>
>_______________________________________________
>Intel-gfx mailing list
>Intel-gfx@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v8 3/5] drm/i915: Remove reference to struct drm_device.pdev
  2021-04-29 10:50 ` [PATCH v8 3/5] drm/i915: " Thomas Zimmermann
@ 2021-04-29 16:03   ` Ruhl, Michael J
  0 siblings, 0 replies; 10+ messages in thread
From: Ruhl, Michael J @ 2021-04-29 16:03 UTC (permalink / raw)
  To: Thomas Zimmermann, jani.nikula, joonas.lahtinen, Vivi, Rodrigo,
	airlied, daniel, chris
  Cc: intel-gfx, dri-devel

>-----Original Message-----
>From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of
>Thomas Zimmermann
>Sent: Thursday, April 29, 2021 6:51 AM
>To: jani.nikula@linux.intel.com; joonas.lahtinen@linux.intel.com; Vivi, Rodrigo
><rodrigo.vivi@intel.com>; airlied@linux.ie; daniel@ffwll.ch; chris@chris-
>wilson.co.uk
>Cc: intel-gfx@lists.freedesktop.org; Thomas Zimmermann
><tzimmermann@suse.de>; dri-devel@lists.freedesktop.org
>Subject: [PATCH v8 3/5] drm/i915: Remove reference to struct
>drm_device.pdev
>
>References to struct drm_device.pdev should not be used any longer as
>the field will be moved into the struct's legacy section. Fix a rsp
>comment.
>
>v8:
>	* fix commit message (Michael)

Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>

m

>Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>---
> drivers/gpu/drm/i915/intel_runtime_pm.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.h
>b/drivers/gpu/drm/i915/intel_runtime_pm.h
>index 1e4ddd11c12b..183ea2b187fe 100644
>--- a/drivers/gpu/drm/i915/intel_runtime_pm.h
>+++ b/drivers/gpu/drm/i915/intel_runtime_pm.h
>@@ -49,7 +49,7 @@ enum i915_drm_suspend_mode {
>  */
> struct intel_runtime_pm {
> 	atomic_t wakeref_count;
>-	struct device *kdev; /* points to i915->drm.pdev->dev */
>+	struct device *kdev; /* points to i915->drm.dev */
> 	bool available;
> 	bool suspended;
> 	bool irqs_enabled;
>--
>2.31.1
>
>_______________________________________________
>dri-devel mailing list
>dri-devel@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH v8 1/5] drm/ast: Remove reference to struct drm_device.pdev
  2021-04-29 10:50 ` [PATCH v8 1/5] drm/ast: Remove reference to struct drm_device.pdev Thomas Zimmermann
@ 2021-04-29 16:04   ` Ruhl, Michael J
  2021-04-29 19:22     ` Thomas Zimmermann
  0 siblings, 1 reply; 10+ messages in thread
From: Ruhl, Michael J @ 2021-04-29 16:04 UTC (permalink / raw)
  To: Thomas Zimmermann, jani.nikula, joonas.lahtinen, Vivi, Rodrigo,
	airlied, daniel, chris
  Cc: Dave Airlie, intel-gfx, lkp, dri-devel



>-----Original Message-----
>From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of
>Thomas Zimmermann
>Sent: Thursday, April 29, 2021 6:51 AM
>To: jani.nikula@linux.intel.com; joonas.lahtinen@linux.intel.com; Vivi, Rodrigo
><rodrigo.vivi@intel.com>; airlied@linux.ie; daniel@ffwll.ch; chris@chris-
>wilson.co.uk
>Cc: lkp <lkp@intel.com>; intel-gfx@lists.freedesktop.org; dri-
>devel@lists.freedesktop.org; Thomas Zimmermann
><tzimmermann@suse.de>; Dave Airlie <airlied@redhat.com>
>Subject: [PATCH v8 1/5] drm/ast: Remove reference to struct
>drm_device.pdev
>
>Using struct drm_device.pdev is deprecated. Upcast with to_pci_dev()
>from struct drm_device.dev to get the PCI device structure.

Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>

m

>Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>Fixes: ba4e0339a6a3 ("drm/ast: Fixed CVE for DP501")
>Cc: KuoHsiang Chou <kuohsiang_chou@aspeedtech.com>
>Cc: kernel test robot <lkp@intel.com>
>Cc: Thomas Zimmermann <tzimmermann@suse.de>
>Cc: Dave Airlie <airlied@redhat.com>
>Cc: dri-devel@lists.freedesktop.org
>---
> drivers/gpu/drm/ast/ast_main.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/drivers/gpu/drm/ast/ast_main.c
>b/drivers/gpu/drm/ast/ast_main.c
>index 189d783f6e2c..6b49a92dc75f 100644
>--- a/drivers/gpu/drm/ast/ast_main.c
>+++ b/drivers/gpu/drm/ast/ast_main.c
>@@ -411,7 +411,6 @@ struct ast_private *ast_device_create(const struct
>drm_driver *drv,
> 		return ast;
> 	dev = &ast->base;
>
>-	dev->pdev = pdev;
> 	pci_set_drvdata(pdev, dev);
>
> 	ast->regs = pcim_iomap(pdev, 1, 0);
>--
>2.31.1
>
>_______________________________________________
>dri-devel mailing list
>dri-devel@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v8 1/5] drm/ast: Remove reference to struct drm_device.pdev
  2021-04-29 16:04   ` Ruhl, Michael J
@ 2021-04-29 19:22     ` Thomas Zimmermann
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Zimmermann @ 2021-04-29 19:22 UTC (permalink / raw)
  To: Ruhl, Michael J, jani.nikula, joonas.lahtinen, Vivi, Rodrigo,
	airlied, daniel, chris
  Cc: Dave Airlie, intel-gfx, lkp, dri-devel


[-- Attachment #1.1.1: Type: text/plain, Size: 2320 bytes --]

Hi

Am 29.04.21 um 18:04 schrieb Ruhl, Michael J:
> 
> 
>> -----Original Message-----
>> From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of
>> Thomas Zimmermann
>> Sent: Thursday, April 29, 2021 6:51 AM
>> To: jani.nikula@linux.intel.com; joonas.lahtinen@linux.intel.com; Vivi, Rodrigo
>> <rodrigo.vivi@intel.com>; airlied@linux.ie; daniel@ffwll.ch; chris@chris-
>> wilson.co.uk
>> Cc: lkp <lkp@intel.com>; intel-gfx@lists.freedesktop.org; dri-
>> devel@lists.freedesktop.org; Thomas Zimmermann
>> <tzimmermann@suse.de>; Dave Airlie <airlied@redhat.com>
>> Subject: [PATCH v8 1/5] drm/ast: Remove reference to struct
>> drm_device.pdev
>>
>> Using struct drm_device.pdev is deprecated. Upcast with to_pci_dev()
>>from struct drm_device.dev to get the PCI device structure.
> 
> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>

Awesome! Thanks a lot for the timely response. I pushed everything into 
drm-misc-next before the bitrot sets in again.

Best regards
Thomas

> 
> m
> 
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Fixes: ba4e0339a6a3 ("drm/ast: Fixed CVE for DP501")
>> Cc: KuoHsiang Chou <kuohsiang_chou@aspeedtech.com>
>> Cc: kernel test robot <lkp@intel.com>
>> Cc: Thomas Zimmermann <tzimmermann@suse.de>
>> Cc: Dave Airlie <airlied@redhat.com>
>> Cc: dri-devel@lists.freedesktop.org
>> ---
>> drivers/gpu/drm/ast/ast_main.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/ast/ast_main.c
>> b/drivers/gpu/drm/ast/ast_main.c
>> index 189d783f6e2c..6b49a92dc75f 100644
>> --- a/drivers/gpu/drm/ast/ast_main.c
>> +++ b/drivers/gpu/drm/ast/ast_main.c
>> @@ -411,7 +411,6 @@ struct ast_private *ast_device_create(const struct
>> drm_driver *drv,
>> 		return ast;
>> 	dev = &ast->base;
>>
>> -	dev->pdev = pdev;
>> 	pci_set_drvdata(pdev, dev);
>>
>> 	ast->regs = pcim_iomap(pdev, 1, 0);
>> --
>> 2.31.1
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-04-29 19:22 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 10:50 [PATCH v8 0/5] drm: Move struct drm_device.pdev to legacy Thomas Zimmermann
2021-04-29 10:50 ` [PATCH v8 1/5] drm/ast: Remove reference to struct drm_device.pdev Thomas Zimmermann
2021-04-29 16:04   ` Ruhl, Michael J
2021-04-29 19:22     ` Thomas Zimmermann
2021-04-29 10:50 ` [PATCH v8 2/5] drm/i915/gt: " Thomas Zimmermann
2021-04-29 16:02   ` [Intel-gfx] " Ruhl, Michael J
2021-04-29 10:50 ` [PATCH v8 3/5] drm/i915: " Thomas Zimmermann
2021-04-29 16:03   ` Ruhl, Michael J
2021-04-29 10:51 ` [PATCH v8 4/5] drm/i915: Don't assign " Thomas Zimmermann
2021-04-29 10:51 ` [PATCH v8 5/5] drm: Move struct drm_device.pdev to legacy section Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).