Skip to contentSkip to conversation

drm/edid: Fix sync polarity of DMT 1920x1080@60Hz

PATCH New Jernej Skrabec 1 participant 1 message Nov 14

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/edid: Fix sync polarity of DMT 1920x1080@60Hz

VESA DMT defines 1920x1080@60Hz (DMT ID 0x52) as the CTA-861 1080p timing (VIC 16), with positive horizontal and vertical sync. The DMT mode table has both polarities negative instead.

Since drm_match_cea_mode() also compares sync flags, a 1920x1080@60Hz mode created from an EDID standard timing doesn't match VIC 16 and ends up as a separate mode next to the one from the CTA Video Data Block. When userspace picks it, the sink receives the wrong sync polarities, and because the mode isn't recognized as a CTA format, the AVI InfoFrame carries no VIC and RGB output uses full instead of limited quantization range.

Use positive sync polarities, as defined by VESA DMT.

Fixes bfcd74d2aeda ("drm/edid: Add DMT modes with ID > 0x50")
---
 drivers/gpu/drm/drm_edid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_edid.c +1 -1
index b8f882a17c8f..7adaa428163f 100644
@@ -607,7 +607,7 @@ static const struct drm_display_mode drm_dmt_modes[] = {
 	/* 0x52 - 1920x1080@60Hz */
 	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500, 1920, 2008,
 		   2052, 2200, 0, 1080, 1084, 1089, 1125, 0,
-		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) },
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
 	/* 0x44 - 1920x1200@60Hz RB */
 	{ DRM_MODE("1920x1200", DRM_MODE_TYPE_DRIVER, 154000, 1920, 1968,
 		   2000, 2080, 0, 1200, 1203, 1209, 1235, 0,
Signature · 1 line
2.43.0