drm/i915/display: Make display responsible for probing its own IP
authorMatt Roper <matthew.d.roper@intel.com>
Tue, 23 May 2023 19:56:07 +0000 (12:56 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 24 May 2023 16:40:42 +0000 (09:40 -0700)
commit69d439818fe501e8c9e50d963a53cb596e36f9f7
tree33af2128a7ed39cd2e14fe806ac493bf3fad5523
parent18e0deeed8c80d8ec0adfff3312252028739ce52
drm/i915/display: Make display responsible for probing its own IP

Rather than selecting the display IP and feature flags at the same time
the general PCI probing happens, move this step into the display code
itself so that it can be more easily re-used outside of i915 (i.e., by
the Xe driver).

v2:
 - Make intel_display_device_probe() always return a non-NULL pointer
   and simplify copying of runtime_defaults.  (Andrzej)
v3:
 - Redefine INTEL_VGA_DEVICE/INTEL_QUANTA_DEVICE to eliminate a cast and
   an include of linux/mod_devicetable.h.  (Jani)
 - Keep explicit memcpy for runtime defaults.  (Jani)

Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230523195609.73627-5-matthew.d.roper@intel.com
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/display/intel_display_device.c [new file with mode: 0644]
drivers/gpu/drm/i915/display/intel_display_device.h
drivers/gpu/drm/i915/i915_pci.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_device_info.c