[Intel-gfx] [PATCH 2/3] drm/i915/display: call gmdid display probe at a higher level
Rodrigo Vivi
rodrigo.vivi at intel.com
Tue Sep 12 12:31:42 UTC 2023
On Tue, Sep 12, 2023 at 03:05:36PM +0300, Jani Nikula wrote:
> Move gmdid selection one abstraction level higher.
>
> Cc: Matt Roper <matthew.d.roper at intel.com>
> Signed-off-by: Jani Nikula <jani.nikula at intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
> ---
> .../gpu/drm/i915/display/intel_display_device.c | 17 +++++++++--------
> 1 file 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)));
> --
> 2.39.2
>
More information about the Intel-gfx
mailing list