@@ -3810,8 +3810,12 @@ static void drm_add_display_info(struct edid *edid,
if (edid->revision < 3)
return;
- if (!(edid->input & DRM_EDID_INPUT_DIGITAL))
+ if (!(edid->input & DRM_EDID_INPUT_DIGITAL)) {
+ /* Analog sinks = infinite bpc, but driver decides */
+ DRM_DEBUG("%s: Assigning analog sink color depth as %d bpc.\n",
+ connector->name, info->bpc);
return;
+ }
/* Get data from CEA blocks if present */
edid_ext = drm_find_cea_extension(edid);
@@ -3829,6 +3833,31 @@ static void drm_add_display_info(struct edid *edid,
/* HDMI deep color modes supported? Assign to info, if so */
drm_assign_hdmi_deep_color_info(edid, info, connector);
+ /*
+ * Digital sink with "DFP 1.x compliant TMDS" according to EDID 1.3?
+ *
+ * For such displays, the DFP spec 1.0, section 3.10 "EDID support"
+ * says:
+ *
+ * "If the DFP monitor only supports EDID 1.X (1.1, 1.2, etc.)
+ * without extensions, the host will make the following assumptions:
+ *
+ * 1. 24-bit MSB-aligned RGB TFT
+ * 2. DE polarity is active high
+ * 3. H and V syncs are active high
+ * 4. Established CRT timings will be used
+ * 5. Dithering will not be enabled on the host"
+ *
+ * So we use 8 bpc in this case and "no dithering" will hopefully
+ * follow.
+ */
+ if ((info->bpc == 0) && (edid->revision < 4) &&
+ (edid->input & DRM_EDID_DIGITAL_TYPE_DVI)) {
+ info->bpc = 8;
+ DRM_DEBUG("%s: Assigning DFP/DVI sink color depth as %d bpc.\n",
+ connector->name, info->bpc);
+ }
+
/* Only defined for 1.4 with digital displays */
if (edid->revision < 4)
return;