aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_device_info.c
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2023-05-23 12:56:07 -0700
committerMatt Roper <matthew.d.roper@intel.com>2023-05-24 09:40:42 -0700
commit69d439818fe501e8c9e50d963a53cb596e36f9f7 (patch)
tree33af2128a7ed39cd2e14fe806ac493bf3fad5523 /drivers/gpu/drm/i915/intel_device_info.c
parent18e0deeed8c80d8ec0adfff3312252028739ce52 (diff)
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
Diffstat (limited to 'drivers/gpu/drm/i915/intel_device_info.c')
-rw-r--r--drivers/gpu/drm/i915/intel_device_info.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c
index 3a0d1cb2eaa9..79523e55ca9c 100644
--- a/drivers/gpu/drm/i915/intel_device_info.c
+++ b/drivers/gpu/drm/i915/intel_device_info.c
@@ -574,7 +574,6 @@ void intel_device_info_driver_create(struct drm_i915_private *i915,
{
struct intel_device_info *info;
struct intel_runtime_info *runtime;
- struct intel_display_runtime_info *display_runtime;
/* Setup the write-once "constant" device info */
info = mkwrite_device_info(i915);
@@ -583,9 +582,12 @@ void intel_device_info_driver_create(struct drm_i915_private *i915,
/* Initialize initial runtime info from static const data and pdev. */
runtime = RUNTIME_INFO(i915);
memcpy(runtime, &INTEL_INFO(i915)->__runtime, sizeof(*runtime));
- display_runtime = DISPLAY_RUNTIME_INFO(i915);
- memcpy(display_runtime, &DISPLAY_INFO(i915)->__runtime_defaults,
- sizeof(*display_runtime));
+
+ /* Probe display support */
+ info->display = intel_display_device_probe(device_id);
+ memcpy(DISPLAY_RUNTIME_INFO(i915),
+ &DISPLAY_INFO(i915)->__runtime_defaults,
+ sizeof(*DISPLAY_RUNTIME_INFO(i915)));
runtime->device_id = device_id;
}