Need code review of "Printing raw EDID" fix
Philip Prindeville
philipp_subx at redfish-solutions.com
Thu Nov 10 11:29:34 PST 2005
Can someone please review and sign-off on:
https://bugs.freedesktop.org/show_bug.cgi?id=4806
Thanks,
-Philip
========
*** xc/programs/Xserver/hw/xfree86/ddc/print_edid.c.bak 2005-07-03
02:53:43.000000000 -0600
--- xc/programs/Xserver/hw/xfree86/ddc/print_edid.c 2005-10-16
23:07:57.000000000 -0600
***************
*** 31,40 ****
--- 31,46 ----
static void print_whitepoint(int scrnIndex, struct disp_features *);
static void print_number_sections(int scrnIndex, int);
+ #define EDID_WIDTH 16
+
xf86MonPtr
xf86PrintEDID(xf86MonPtr m)
{
+ CARD16 i, j;
+ char buf[EDID_WIDTH * 2 + 1];
+
if (!(m)) return NULL;
+
print_vendor(m->scrnIndex,&m->vendor);
print_version(m->scrnIndex,&m->ver);
print_display(m->scrnIndex,&m->features, &m->ver);
***************
*** 42,47 ****
--- 48,62 ----
print_std_timings(m->scrnIndex,m->timings2);
print_detailed_monitor_section(m->scrnIndex,m->det_mon);
print_number_sections(m->scrnIndex,m->no_sections);
+
+ xf86DrvMsg(m->scrnIndex, X_INFO, "EDID (in hex):\n");
+
+ for (i = 0; i < 128; i += j) {
+ for (j = 0; j < EDID_WIDTH; ++j) {
+ sprintf(&buf[j * 2], "%02x", m->rawData[i + j]);
+ }
+ xf86DrvMsg(m->scrnIndex, X_INFO, "\t%s\n", buf);
+ }
return m;
}
More information about the xorg
mailing list