[Intel-gfx] [edid-decode 4/7] Print the HDMI resolution next to the HDMI VICs
Damien Lespiau
damien.lespiau at intel.com
Wed Aug 7 15:58:20 CEST 2013
Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
edid-decode.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/edid-decode.c b/edid-decode.c
index 55e48a7..5061228 100644
--- a/edid-decode.c
+++ b/edid-decode.c
@@ -659,6 +659,13 @@ cea_video_block(unsigned char *x)
}
}
+static const char *edid_cea_hdmi_modes[] = {
+ "3840x2160 at 30Hz",
+ "3840x2160 at 25Hz",
+ "3840x2160 at 24Hz",
+ "4096x2160 at 24Hz",
+};
+
static void
cea_hdmi_block(unsigned char *x)
{
@@ -737,8 +744,18 @@ cea_hdmi_block(unsigned char *x)
if (len_vic) {
int i;
- for (i = 0; i < len_vic; i++)
- printf(" HDMI VIC %d\n", x[9 + b + i]);
+ for (i = 0; i < len_vic; i++) {
+ unsigned char vic = x[9 + b + i];
+ const char *mode;
+
+ vic--;
+ if (vic < ARRAY_SIZE(edid_cea_hdmi_modes))
+ mode = edid_cea_hdmi_modes[vic];
+ else
+ mode = "Unknown mode";
+
+ printf(" HDMI VIC %d %s\n", vic, mode);
+ }
b += len_vic;
}
--
1.8.3.1
More information about the Intel-gfx
mailing list