Re: [PATCH v4 0/6] drm: Move struct drm_device.pdev to legacy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



FYI patches 1 and 5 are now in drm-misc-next.

Am 18.01.21 um 14:14 schrieb Thomas Zimmermann:
I merged more patches into drm-misc-next. I'm mostly sending out v4 of
this patchset to split the final patch into the core changes and the
patch for moving pdev behind CONFIG_DRM_LEGACY. The former are required
to fix a reported bug. [1] There's also a fix to vmwgfx.

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.

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)

[1] https://lore.kernel.org/dri-devel/7851c78c-8c57-3c84-cd49-a72703095a5d@xxxxxxx/

Thomas Zimmermann (6):
   drm: Upcast struct drm_device.dev to struct pci_device; replace pdev
   drm/i915: Remove references to struct drm_device.pdev
   drm/i915/gt: Remove references to struct drm_device.pdev
   drm/i915/gvt: Remove references to struct drm_device.pdev
   drm/vmwgfx: Remove reference to struct drm_device.pdev
   drm: Move struct drm_device.pdev to legacy section

  drivers/gpu/drm/drm_agpsupport.c              |  9 ++++---
  drivers/gpu/drm/drm_bufs.c                    |  4 +--
  drivers/gpu/drm/drm_edid.c                    |  7 ++++-
  drivers/gpu/drm/drm_irq.c                     | 12 +++++----
  drivers/gpu/drm/drm_pci.c                     | 26 +++++++++++--------
  drivers/gpu/drm/drm_vm.c                      |  2 +-
  drivers/gpu/drm/i915/display/intel_bios.c     |  2 +-
  drivers/gpu/drm/i915/display/intel_cdclk.c    | 14 +++++-----
  drivers/gpu/drm/i915/display/intel_csr.c      |  2 +-
  drivers/gpu/drm/i915/display/intel_dsi_vbt.c  |  2 +-
  drivers/gpu/drm/i915/display/intel_fbdev.c    |  2 +-
  drivers/gpu/drm/i915/display/intel_gmbus.c    |  2 +-
  .../gpu/drm/i915/display/intel_lpe_audio.c    |  5 ++--
  drivers/gpu/drm/i915/display/intel_opregion.c |  6 ++---
  drivers/gpu/drm/i915/display/intel_overlay.c  |  2 +-
  drivers/gpu/drm/i915/display/intel_panel.c    |  4 +--
  drivers/gpu/drm/i915/display/intel_quirks.c   |  2 +-
  drivers/gpu/drm/i915/display/intel_sdvo.c     |  2 +-
  drivers/gpu/drm/i915/display/intel_vga.c      |  8 +++---
  drivers/gpu/drm/i915/gem/i915_gem_phys.c      |  6 ++---
  drivers/gpu/drm/i915/gem/i915_gem_shmem.c     |  2 +-
  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_region_lmem.c   |  8 +++---
  drivers/gpu/drm/i915/gt/intel_reset.c         |  6 ++---
  drivers/gpu/drm/i915/gvt/cfg_space.c          |  5 ++--
  drivers/gpu/drm/i915/gvt/firmware.c           | 10 +++----
  drivers/gpu/drm/i915/gvt/gtt.c                | 12 ++++-----
  drivers/gpu/drm/i915/gvt/gvt.c                |  6 ++---
  drivers/gpu/drm/i915/gvt/kvmgt.c              |  4 +--
  drivers/gpu/drm/i915/i915_debugfs.c           |  2 +-
  drivers/gpu/drm/i915/i915_drv.c               | 20 +++++++-------
  drivers/gpu/drm/i915/i915_drv.h               |  2 +-
  drivers/gpu/drm/i915/i915_gem_gtt.c           |  5 ++--
  drivers/gpu/drm/i915/i915_getparam.c          |  5 ++--
  drivers/gpu/drm/i915/i915_gpu_error.c         |  2 +-
  drivers/gpu/drm/i915/i915_irq.c               |  6 ++---
  drivers/gpu/drm/i915/i915_pmu.c               |  2 +-
  drivers/gpu/drm/i915/i915_suspend.c           |  4 +--
  drivers/gpu/drm/i915/i915_switcheroo.c        |  4 +--
  drivers/gpu/drm/i915/i915_vgpu.c              |  2 +-
  drivers/gpu/drm/i915/intel_device_info.c      |  2 +-
  drivers/gpu/drm/i915/intel_runtime_pm.c       |  2 +-
  drivers/gpu/drm/i915/intel_uncore.c           |  4 +--
  .../gpu/drm/i915/selftests/mock_gem_device.c  |  1 -
  drivers/gpu/drm/i915/selftests/mock_gtt.c     |  2 +-
  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c           |  1 -
  include/drm/drm_device.h                      |  6 ++---
  50 files changed, 137 insertions(+), 125 deletions(-)

--
2.29.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
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: OpenPGP_signature
Description: OpenPGP digital signature

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

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux