diff options
author | Jani Nikula <jani.nikula@intel.com> | 2023-09-12 15:05:36 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2023-09-15 18:29:15 +0300 |
commit | a2c57575b90a17003a03e1e1a72793c12bde0bce (patch) | |
tree | f048f098664e44363df5f9a1636e7c41c38db41e /drivers/gpu/drm/i915/display/intel_display_device.c | |
parent | 6686c30e455cd4bc6dbca44dfc225bc0243e600e (diff) | |
download | linux-a2c57575b90a17003a03e1e1a72793c12bde0bce.tar.xz |
drm/i915/display: call gmdid display probe at a higher level
Move gmdid selection one abstraction level higher.
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230912120537.2158209-2-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_display_device.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_display_device.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c b/drivers/gpu/drm/i915/display/intel_display_device.c index ed564566e31b..4a6c4ee503b2 100644 --- a/drivers/gpu/drm/i915/display/intel_display_device.c +++ b/drivers/gpu/drm/i915/display/intel_display_device.c @@ -851,15 +851,11 @@ probe_gmdid_display(struct drm_i915_private *i915, u16 *ver, u16 *rel, u16 *step } static const struct intel_display_device_info * -probe_display(struct drm_i915_private *i915, bool has_gmdid, - u16 *gmdid_ver, u16 *gmdid_rel, u16 *gmdid_step) +probe_display(struct drm_i915_private *i915) { struct pci_dev *pdev = to_pci_dev(i915->drm.dev); int i; - if (has_gmdid) - return probe_gmdid_display(i915, gmdid_ver, gmdid_rel, gmdid_step); - if (has_no_display(pdev)) { drm_dbg_kms(&i915->drm, "Device doesn't have display\n"); return &no_display; @@ -878,11 +874,16 @@ probe_display(struct drm_i915_private *i915, bool has_gmdid, void intel_display_device_probe(struct drm_i915_private *i915) { + const struct intel_display_device_info *info; u16 ver, rel, step; - /* Probe display support */ - i915->display.info.__device_info = probe_display(i915, HAS_GMD_ID(i915), - &ver, &rel, &step); + if (HAS_GMD_ID(i915)) + info = probe_gmdid_display(i915, &ver, &rel, &step); + else + info = probe_display(i915); + + i915->display.info.__device_info = info; + memcpy(DISPLAY_RUNTIME_INFO(i915), &DISPLAY_INFO(i915)->__runtime_defaults, sizeof(*DISPLAY_RUNTIME_INFO(i915))); |