From: Thomas Zimmermann Date: Tue, 27 Apr 2021 17:48:57 +0000 (+0200) Subject: drm/i915/gem: Remove reference to struct drm_device.pdev X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=ff2d0ba25ad68b97e3260f16c56113493bc58656;p=kernel.git drm/i915/gem: 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. v2: * fix an error in the commit description (Michael) Signed-off-by: Thomas Zimmermann Reviewed-by: Jani Nikula Fixes: d57d4a1daf5e ("drm/i915: Create stolen memory region from local memory") Cc: CQ Tang Cc: Matthew Auld Cc: Tvrtko Ursulin Cc: Xinyun Liu Cc: Tvrtko Ursulin Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Chris Wilson Cc: Mika Kuoppala Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: "Thomas Hellström" Cc: "Gustavo A. R. Silva" Cc: Dan Carpenter Cc: intel-gfx@lists.freedesktop.org Reviewed-by: Michael J. Ruhl Signed-off-by: Jani Nikula Link: https://patchwork.freedesktop.org/patch/msgid/20210427174857.7862-1-tzimmermann@suse.de --- diff --git a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c index c5b64b2400e8b..e1a32672bbe87 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_stolen.c @@ -773,7 +773,7 @@ struct intel_memory_region * i915_gem_stolen_lmem_setup(struct drm_i915_private *i915) { struct intel_uncore *uncore = &i915->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;