From: Adam Jackson Date: Mon, 29 Mar 2010 21:43:25 +0000 (+0000) Subject: drm/edid: Fix preferred mode parse for EDID 1.4 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a327f6b806103ee177aba20bb1e42ba7ec7d0f4b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/edid: Fix preferred mode parse for EDID 1.4 In 1.4, the first detailed mode is always the preferred mode. The bit that used to mean that, now means "this mode is the physical size in pixels". Signed-off-by: Adam Jackson Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index 9aa65b289d01..2e1298cf576f 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -1295,7 +1295,10 @@ static int add_detailed_info(struct drm_connector *connector, for (i = 0; i < EDID_DETAILED_TIMINGS; i++) { struct detailed_timing *timing = &edid->detailed_timings[i]; - int preferred = (i == 0) && (edid->features & DRM_EDID_FEATURE_PREFERRED_TIMING); + int preferred = (i == 0); + + if (preferred && edid->version == 1 && edid->revision < 4) + preferred = (edid->features & DRM_EDID_FEATURE_PREFERRED_TIMING); /* In 1.0, only timings are allowed */ if (!timing->pixel_clock && edid->version == 1 &&