]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/i915/display: Handle GMD_ID identification in display code
authorMatt Roper <matthew.d.roper@intel.com>
Tue, 23 May 2023 19:56:08 +0000 (12:56 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 24 May 2023 16:40:53 +0000 (09:40 -0700)
commit12e6f6dc78e4f4a418648fb1a9c0cd2ae9b3430b
tree6d4df7b022ae0178c7708bfc7cfd7b4f792fc484
parent69d439818fe501e8c9e50d963a53cb596e36f9f7
drm/i915/display: Handle GMD_ID identification in display code

For platforms with GMD_ID support (i.e., everything MTL and beyond),
identification of the display IP present should be based on the contents
of the GMD_ID register rather than a PCI devid match.

Note that since GMD_ID readout requires access to the PCI BAR, a slight
change to the driver init sequence is needed --- pci_enable_device() is
now called before i915_driver_create().

v2:
 - Fix use of uninitialized i915 pointer in error path if
   pci_enable_device() fails before the i915 device is created.  (lkp)
 - Use drm_device parameter to intel_display_device_probe.  This goes
   against i915 conventions, but since the primary goal here is to make
   it easy to call this function from other drivers (like Xe) and since
   we don't need anything from the i915 structure, this seems like an
   exception where drm_device is a more natural fit.
v3:
 - Go back do drm_i915_private for intel_display_device_probe.  (Jani)
 - Move forward decl to top of header.  (Jani)

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230523195609.73627-6-matthew.d.roper@intel.com
drivers/gpu/drm/i915/display/intel_display_device.c
drivers/gpu/drm/i915/display/intel_display_device.h
drivers/gpu/drm/i915/i915_driver.c
drivers/gpu/drm/i915/intel_device_info.c