[Intel-gfx] [PATCH] drm/i915/dp: set fail-safe mode if EDID corrupt
Jani Nikula
jani.nikula at linux.intel.com
Tue Jan 21 08:44:58 UTC 2020
On Tue, 21 Jan 2020, Lee Shawn C <shawn.c.lee at intel.com> wrote:
> According to chapter 5.1.1.2 in DP spec. When the Sink
> device capability is unknown, for example due to corruption
> of an EDID. The Source device may fall back to a set of
> fall-back video timing formats its choice. When none of
> the fall-back video timing formats is acceptable, the
> Source device must fall back to the fail safe mode,
> which is 640 x 480 at 60Hz.
>
> This change set source driver output fail-safe mode automatically
> if EDID corrupt. It may also benefit link layer compliance
> test case "4.2.2.6 EDID Corruption Detection".
Are you fixing a real user visible bug here, trying to pass compliance
tests, or just trying harder to comply with the spec?
I am wondering under what circumstances we could actually display a
640x480 image when everything else fails.
BR,
Jani.
>
> Cc: Manasi Navare <manasi.d.navare at intel.com>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Cc: Jani Nikula <jani.nikula at linux.intel.com>
> Cc: Cooper Chiou <cooper.chiou at intel.com>
> Signed-off-by: Lee Shawn C <shawn.c.lee at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index c27d3e7ac219..7e072db4a530 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5659,9 +5659,18 @@ intel_dp_get_edid(struct intel_dp *intel_dp)
> return NULL;
>
> return drm_edid_duplicate(intel_connector->edid);
> - } else
> - return drm_get_edid(&intel_connector->base,
> + } else {
> + struct edid *edid;
> +
> + edid = drm_get_edid(&intel_connector->base,
> &intel_dp->aux.ddc);
> +
> + if (intel_connector->base.edid_corrupt || !edid)
> + if (drm_add_modes_noedid(&intel_connector->base, 640, 480))
> + drm_set_preferred_mode(&intel_connector->base, 640, 480);
> +
> + return edid;
> + }
> }
>
> static void
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list