[PATCH 7/7] drm/edid: Add modes from CEA short video descriptor codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Signed-off-by: Adam Jackson <ajax@xxxxxxxxxx>
---
 drivers/gpu/drm/drm_edid.c       |  188 +++++++++++++++++++---------
 drivers/gpu/drm/drm_edid_modes.h |  260 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 389 insertions(+), 59 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 817ffab..44fd754 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1223,53 +1223,23 @@ add_cvt_modes(struct drm_connector *connector, struct edid *edid)
 	return closure.modes;
 }
 
-static void
-do_detailed_mode(struct detailed_timing *timing, void *c)
+/* XXX assumes there's only one */
+static u8 *
+find_cea_block(struct edid *edid)
 {
-	struct detailed_mode_closure *closure = c;
-	struct drm_display_mode *newmode;
-
-	if (timing->pixel_clock) {
-		newmode = drm_mode_detailed(closure->connector->dev,
-					    closure->edid, timing,
-					    closure->quirks);
-		if (!newmode)
-			return;
+	int i;
+	u8 *ret;
 
-		if (closure->preferred)
-			newmode->type |= DRM_MODE_TYPE_PREFERRED;
+	if (!edid)
+		return NULL;
 
-		drm_mode_probed_add(closure->connector, newmode);
-		closure->modes++;
-		closure->preferred = 0;
+	for (i = 0; i < edid->extensions; i++) {
+		ret = (u8 *)edid + EDID_LENGTH * (i + 1);
+		if (ret[0] == CEA_EXT)
+			return ret;
 	}
-}
-
-/*
- * add_detailed_modes - Add modes from detailed timings
- * @connector: attached connector
- * @edid: EDID block to scan
- * @quirks: quirks to apply
- */
-static int
-add_detailed_modes(struct drm_connector *connector, struct edid *edid,
-		   u32 quirks)
-{
-	struct detailed_mode_closure closure = {
-		connector,
-		edid,
-		1,
-		quirks,
-		0
-	};
-
-	if (closure.preferred && !version_greater(edid, 1, 3))
-		closure.preferred =
-		    (edid->features & DRM_EDID_FEATURE_PREFERRED_TIMING);
-
-	drm_for_each_detailed_block((u8 *)edid, do_detailed_mode, &closure);
 
-	return closure.modes;
+	return NULL;
 }
 
 #define HDMI_IDENTIFIER 0x000C03
@@ -1283,25 +1253,13 @@ add_detailed_modes(struct drm_connector *connector, struct edid *edid,
  */
 bool drm_detect_hdmi_monitor(struct edid *edid)
 {
-	char *edid_ext = NULL;
+	u8 *edid_ext = NULL;
 	int i, hdmi_id;
 	int start_offset, end_offset;
 	bool is_hdmi = false;
 
-	/* No EDID or EDID extensions */
-	if (edid == NULL || edid->extensions == 0)
-		goto end;
-
-	/* Find CEA extension */
-	for (i = 0; i < edid->extensions; i++) {
-		edid_ext = (char *)edid + EDID_LENGTH * (i + 1);
-		/* This block is CEA extension */
-		if (edid_ext[0] == 0x02)
-			break;
-	}
-
-	if (i == edid->extensions)
-		goto end;
+	if (!(edid_ext = find_cea_block(edid)))
+		return false;
 
 	/* Data block offset in CEA extension block */
 	start_offset = 4;
@@ -1325,11 +1283,116 @@ bool drm_detect_hdmi_monitor(struct edid *edid)
 		}
 	}
 
-end:
 	return is_hdmi;
 }
 EXPORT_SYMBOL(drm_detect_hdmi_monitor);
 
+static int
+add_cea_modes(struct drm_connector *connector, struct edid *edid)
+{
+	u8 *block = find_cea_block(edid);
+	u8 *b, *end;
+	int modes = 0;
+
+	if (!block)
+		return 0;
+
+	if (block[0x01] < 3)
+		return 0; /* SVDs not specified yet */
+
+	b = block;
+	end = block + block[0x02];
+
+	while (b < end) {
+		u8 header = *b;
+		u8 length = header & 0x1f;
+		u8 tag = (header & 0xe0) >> 5;
+
+		if (tag == 2) {
+			int i, m;
+			struct drm_display_mode *mode, *newmode;
+			for (i = 1; i <= length; i++) {
+				m = b[i] & 0x7f;
+				if (m > cea_num_modes) /* XXX warn */
+					continue;
+
+				/*
+				 * Don't add modes that require pixel repeat,
+				 * yet. The driver needs to be aware of this
+				 * and we don't have a mechanism for that.
+				 *
+				 * This prunes some modes that don't need 
+				 * repeat; oh well.
+				 */
+				mode = &cea_modes[m];
+				if (mode->hdisplay == 1440 ||
+				    mode->hdisplay == 2880)
+					continue;
+
+				newmode = drm_mode_duplicate(connector->dev,
+							     &cea_modes[m]);
+				if (newmode) {
+					drm_mode_probed_add(connector, newmode);
+					modes++;
+				}
+			}
+		}
+
+		b += length;
+	}
+
+	return modes;
+}
+
+static void
+do_detailed_mode(struct detailed_timing *timing, void *c)
+{
+	struct detailed_mode_closure *closure = c;
+	struct drm_display_mode *newmode;
+
+	if (timing->pixel_clock) {
+		newmode = drm_mode_detailed(closure->connector->dev,
+					    closure->edid, timing,
+					    closure->quirks);
+		if (!newmode)
+			return;
+
+		if (closure->preferred)
+			newmode->type |= DRM_MODE_TYPE_PREFERRED;
+
+		drm_mode_probed_add(closure->connector, newmode);
+		closure->modes++;
+		closure->preferred = 0;
+	}
+}
+
+/*
+ * add_detailed_modes - Add modes from detailed timings
+ * @connector: attached connector
+ * @edid: EDID block to scan
+ * @quirks: quirks to apply
+ */
+static int
+add_detailed_modes(struct drm_connector *connector, struct edid *edid,
+		   u32 quirks)
+{
+	struct detailed_mode_closure closure = {
+		connector,
+		edid,
+		1,
+		quirks,
+		0
+	};
+
+	if (closure.preferred && !version_greater(edid, 1, 3))
+		closure.preferred =
+		    (edid->features & DRM_EDID_FEATURE_PREFERRED_TIMING);
+
+	drm_for_each_detailed_block((u8 *)edid, do_detailed_mode, &closure);
+
+	return closure.modes;
+}
+
 /**
  * drm_add_edid_modes - add modes from EDID data, if available
  * @connector: connector we're probing
@@ -1367,9 +1430,16 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
 	 *
 	 * We get this pretty much right.
 	 *
-	 * XXX order for additional mode types in extension blocks?
+	 * CEA defines "short video descriptors" but is not especially clear
+	 * what their priority is.  Depending how you read it, all of:
+	 * - the first detailed timing in base block
+	 * - the first short video descriptor
+	 * - any short video descriptors with a preferred bit set
+	 * are "preferred".  Thanks for that.  We'll assume they all come
+	 * after detailed timings but before CVT timings.
 	 */
 	num_modes += add_detailed_modes(connector, edid, quirks);
+	num_modes += add_cea_modes(connector, edid);
 	num_modes += add_cvt_modes(connector, edid);
 	num_modes += add_standard_modes(connector, edid);
 	num_modes += add_established_modes(connector, edid);
diff --git a/drivers/gpu/drm/drm_edid_modes.h b/drivers/gpu/drm/drm_edid_modes.h
index 19690cd..f83953f 100644
--- a/drivers/gpu/drm/drm_edid_modes.h
+++ b/drivers/gpu/drm/drm_edid_modes.h
@@ -466,3 +466,263 @@ static const struct {
 	{ 1920, 1440, 75, 0 },
 };
 static const int num_est3_modes = sizeof(est3_modes) / sizeof(est3_modes[0]);
+
+static struct drm_display_mode cea_modes[] = {
+	{ DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25175,
+		   640, 656, 752, 800, 0,
+		   480, 490, 492, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 1:640x480@60Hz */
+	{ DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 27000,
+		   720, 736, 798, 858, 0,
+		   480, 489, 495, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 2:720x480@60Hz */
+	{ DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 27000,
+		   720, 736, 798, 858, 0,
+		   480, 489, 495, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 3:720x480@60Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250,
+		   1280, 1390, 1430, 1650, 0,
+		   720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 4: 1280x720@60Hz */
+	{ DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 74250,
+		   1920, 2008, 2052, 2200, 0,
+		   1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 5:1920x1080i@60Hz */
+	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 27000,
+		   1440, 1478, 1602, 1716, 0,
+		   480, 488, 494, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 6:1440x480i@60Hz */
+	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 27000,
+		   1440, 1478, 1602, 1716, 0,
+		   480, 488, 494, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 7:1440x480i@60Hz */
+	{ DRM_MODE("1440x240", DRM_MODE_TYPE_DRIVER, 27000,
+		   1440, 1478, 1602, 1716, 0,
+		   240, 244, 247, 262, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 8:1440x240@60Hz */
+	{ DRM_MODE("1440x240", DRM_MODE_TYPE_DRIVER, 27000,
+		   1440, 1478, 1602, 1716, 0,
+		   240, 244, 247, 262, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 9:1440x240@60Hz */
+	{ DRM_MODE("2880x480i", DRM_MODE_TYPE_DRIVER, 54000,
+		   2880, 2956, 3204, 3432, 0,
+		   480, 488, 494, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 10:2880x480i@60Hz */
+	{ DRM_MODE("2880x480i", DRM_MODE_TYPE_DRIVER, 54000,
+		   2880, 2956, 3204, 3432, 0,
+		   480, 488, 494, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 11:2880x480i@60Hz */
+	{ DRM_MODE("2880x240", DRM_MODE_TYPE_DRIVER, 54000,
+		   2880, 2956, 3204, 3432, 0,
+		   240, 244, 247, 262, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 12:2880x240@60Hz */
+	{ DRM_MODE("2880x240", DRM_MODE_TYPE_DRIVER, 54000,
+		   2880, 2956, 3204, 3432, 0,
+		   240, 244, 247, 262, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 13:2880x240@60Hz */
+	{ DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 54000,
+		   1440, 1472, 1596, 1716, 0,
+		   480, 489, 495, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 14:1440x480@60Hz */
+	{ DRM_MODE("1440x480", DRM_MODE_TYPE_DRIVER, 54000,
+		   1440, 1472, 1596, 1716, 0,
+		   480, 489, 495, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 15:1440x480@60Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500,
+		   1920, 2008, 2052, 2200, 0,
+		   1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 16:1920x1080@60Hz */
+	{ DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 27000,
+		   720, 732, 796, 864, 0,
+		   576, 581, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 17:720x576@50Hz */
+	{ DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 27000,
+		   720, 732, 796, 864, 0,
+		   576, 581, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 18:720x576@50Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250,
+		   1280, 1720, 1760, 1980, 0,
+		   720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 19: 1280x720@50Hz */
+	{ DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 74250,
+		   1920, 2448, 2492, 2640, 0,
+		   1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 20:1920x1080i@50Hz */
+	{ DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 27000,
+		   1440, 1464, 1590, 1728, 0,
+		   576, 580, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 21:1440x576i@50Hz */
+	{ DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 27000,
+		   1440, 1464, 1590, 1728, 0,
+		   576, 580, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 22:1440x576i@50Hz */
+	{ DRM_MODE("1440x288", DRM_MODE_TYPE_DRIVER, 27000,
+		   1440, 1464, 1590, 1728, 0,
+		   288, 290, 293, 312, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 23:1440x288@50Hz */
+	{ DRM_MODE("1440x288", DRM_MODE_TYPE_DRIVER, 27000,
+		   1440, 1464, 1590, 1728, 0,
+		   288, 290, 293, 312, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 24:1440x288@50Hz */
+	{ DRM_MODE("2880x576i", DRM_MODE_TYPE_DRIVER, 54000,
+		   2880, 2928, 3180, 3456, 0,
+		   576, 580, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 25:2880x576i@50Hz */
+	{ DRM_MODE("2880x576i", DRM_MODE_TYPE_DRIVER, 54000,
+		   2880, 2928, 3180, 3456, 0,
+		   576, 580, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 26:2880x576i@50Hz */
+	{ DRM_MODE("2880x288", DRM_MODE_TYPE_DRIVER, 54000,
+		   2880, 2928, 3180, 3456, 0,
+		   288, 290, 293, 312, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 27:2880x288@50Hz */
+	{ DRM_MODE("2880x288", DRM_MODE_TYPE_DRIVER, 54000,
+		   2880, 2928, 3180, 3456, 0,
+		   288, 290, 293, 312, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 28:2880x288@50Hz */
+	{ DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000,
+		   1440, 1464, 1592, 1728, 0,
+		   576, 581, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 29:1440x576@50Hz */
+	{ DRM_MODE("1440x576", DRM_MODE_TYPE_DRIVER, 54000,
+		   1440, 1464, 1592, 1728, 0,
+		   576, 581, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 30:1440x576@50Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 148500,
+		   1920, 2448, 2492, 2640, 0,
+		   1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 31:1920x1080@50Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250,
+		   1920, 2558, 2602, 2750, 0,
+		   1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 32:1920x1080@24Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250,
+		   1920, 2448, 2492, 2640, 0,
+		   1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 33:1920x1080@25Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 74250,
+		   1920, 2008, 2052, 2200, 0,
+		   1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 34:1920x1080@30Hz */
+	{ DRM_MODE("2880x480", DRM_MODE_TYPE_DRIVER, 108000,
+		   2880, 2944, 3192, 3432, 0,
+		   480, 489, 495, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 35:2880x480@60Hz */
+	{ DRM_MODE("2880x480", DRM_MODE_TYPE_DRIVER, 108000,
+		   2880, 2944, 3192, 3432, 0,
+		   480, 489, 495, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 36:2880x480@60Hz */
+	{ DRM_MODE("2880x576", DRM_MODE_TYPE_DRIVER, 108000,
+		   2880, 2928, 3184, 3456, 0,
+		   576, 581, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 37:2880x576@50Hz */
+	{ DRM_MODE("2880x576", DRM_MODE_TYPE_DRIVER, 108000,
+		   2880, 2928, 3184, 3456, 0,
+		   576, 581, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 38:2880x576@50Hz */
+	{ DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 72000,
+		   1920, 1952, 2120, 2304, 0,
+		   1080, 1126, 1136, 1250, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 39:1920x1080i@50Hz */
+	{ DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 148500,
+		   1920, 2448, 2492, 2640, 0,
+		   1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 40:1920x1080i@100Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500,
+		   1280, 1720, 1760, 1980, 0,
+		   720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 41:1280x720@100Hz */
+	{ DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 54000,
+		   720, 732, 796, 864, 0,
+		   576, 581, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 42:720x576@100Hz */
+	{ DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 54000,
+		   720, 732, 796, 864, 0,
+		   576, 581, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 43:720x576@100Hz */
+	{ DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 54000,
+		   1440, 1464, 1590, 1728, 0,
+		   576, 580, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 44:1440x576i@100Hz */
+	{ DRM_MODE("1400x576i", DRM_MODE_TYPE_DRIVER, 54000,
+		   1440, 1464, 1590, 1728, 0,
+		   576, 580, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 45:1440x576i@100Hz */
+	{ DRM_MODE("1920x1080i", DRM_MODE_TYPE_DRIVER, 148500,
+		   1920, 2008, 2052, 2200, 0,
+		   1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_INTERLACE) }, /* VIC 46:1920x1080i@120Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 148500,
+		   1280, 1390, 1430, 1650, 0,
+		   720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 47:1280x720@120Hz */
+	{ DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 54000,
+		   720, 736, 798, 858, 0,
+		   480, 489, 495, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 48:720x480@120Hz */
+	{ DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 54000,
+		   720, 736, 798, 858, 0,
+		   480, 489, 495, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 49:720x480@120Hz */
+	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 54000,
+		   1440, 1478, 1602, 1716, 0,
+		   480, 488, 494, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) },/* VIC 50:1440x480i@120Hz */
+	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 54000,
+		   1440, 1478, 1602, 1716, 0,
+		   480, 488, 494, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) },/* VIC 51:1440x480i@120Hz */
+	{ DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 108000,
+		   720, 732, 796, 864, 0,
+		   576, 581, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 52:720x576@200Hz */
+	{ DRM_MODE("720x576", DRM_MODE_TYPE_DRIVER, 108000,
+		   720, 732, 796, 864, 0,
+		   576, 581, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 53:720x576@200Hz */
+	{ DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 108000,
+		   1440, 1464, 1590, 1728, 0,
+		   576, 580, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) },/* VIC 54:1440x576i@200Hz */
+	{ DRM_MODE("1440x576i", DRM_MODE_TYPE_DRIVER, 108000,
+		   1440, 1464, 1590, 1728, 0,
+		   576, 580, 586, 625, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) },/* VIC 55:1440x576i@200Hz */
+	{ DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 108000,
+		   720, 736, 798, 858, 0,
+		   480, 489, 495, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 56:720x480@240Hz */
+	{ DRM_MODE("720x480", DRM_MODE_TYPE_DRIVER, 108000,
+		   720, 736, 798, 858, 0,
+		   480, 489, 495, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC) }, /* VIC 57:720x480@240Hz */
+	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 108000,
+		   1440, 1478, 1602, 1716, 0,
+		   480, 488, 494, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) },/* VIC 58:1440x480i@240 */
+	{ DRM_MODE("1440x480i", DRM_MODE_TYPE_DRIVER, 108000,
+		   1440, 1478, 1602, 1716, 0,
+		   480, 488, 494, 525, 0,
+		   DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE) },/* VIC 59:1440x480i@240 */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 59400,
+		   1280, 3040, 3080, 3300, 0,
+		   720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 60: 1280x720@24Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250,
+		   3700, 3740, 1430, 3960, 0,
+		   720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 61: 1280x720@25Hz */
+	{ DRM_MODE("1280x720", DRM_MODE_TYPE_DRIVER, 74250,
+		   1280, 3040, 3080, 3300, 0,
+		   720, 725, 730, 750, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 62: 1280x720@30Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000,
+		   1920, 2008, 2052, 2200, 0,
+		   1080, 1084, 1089, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 63: 1920x1080@120Hz */
+	{ DRM_MODE("1920x1080", DRM_MODE_TYPE_DRIVER, 297000,
+		   1920, 2448, 2492, 2640, 0,
+		   1080, 1084, 1094, 1125, 0,
+		   DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) }, /* VIC 64:1920x1080@100Hz */
+	};
+static const int cea_num_modes = sizeof(cea_modes) / sizeof(cea_modes[0]);
-- 
1.7.2

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Home]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Video Projectors]     [PDAs]     [Free Online Dating]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [16.7MP]

Add to Google Powered by Linux