xf86-video-intel: src/bios_reader/bios_reader.c
Jesse Barnes
jbarnes at kemper.freedesktop.org
Tue Jan 13 16:53:44 PST 2009
src/bios_reader/bios_reader.c | 28 +++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
New commits:
commit f659cc37e61364a408355b9a6a44d39f4d759935
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date: Tue Jan 13 16:49:41 2009 -0800
bios_reader: make mode timing output friendlier
Print out the calculated mode line values (as i830_bios.c uses) and
check for validity against known problems.
diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index 717f5bf..4b20e0d 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -299,6 +299,9 @@ static void dump_lvds_data(void)
struct bdb_lvds_lfp_data *lvds_data;
int num_entries;
int i;
+ int hdisplay, hsyncstart, hsyncend, htotal;
+ int vdisplay, vsyncstart, vsyncend, vtotal;
+ float clock;
block = find_section(BDB_LVDS_LFP_DATA);
if (!block) {
@@ -322,6 +325,17 @@ static void dump_lvds_data(void)
else
marker = ' ';
+ hdisplay = _H_ACTIVE(timing_data);
+ hsyncstart = hdisplay + _H_SYNC_OFF(timing_data);
+ hsyncend = hsyncstart + _H_SYNC_WIDTH(timing_data);
+ htotal = hdisplay + _H_BLANK(timing_data);
+
+ vdisplay = _V_ACTIVE(timing_data);
+ vsyncstart = vdisplay + _V_SYNC_OFF(timing_data);
+ vsyncend = vsyncstart + _V_SYNC_WIDTH(timing_data);
+ vtotal = vdisplay + _V_BLANK(timing_data);
+ clock = _PIXEL_CLOCK(timing_data) / 1000;
+
printf("%c\tpanel type %02i: %dx%d clock %d\n", marker,
i, lfp_data->fp_timing.x_res, lfp_data->fp_timing.y_res,
_PIXEL_CLOCK(timing_data));
@@ -336,15 +350,11 @@ static void dump_lvds_data(void)
(unsigned long)lfp_data->fp_timing.pp_cycle_reg_val);
printf("\t\t PFIT: 0x%08lx\n",
(unsigned long)lfp_data->fp_timing.pfit_reg_val);
- printf("\t\ttimings: %d %d %d %d %d %d %d %d\n",
- _H_ACTIVE(timing_data),
- _H_BLANK(timing_data),
- _H_SYNC_OFF(timing_data),
- _H_SYNC_WIDTH(timing_data),
- _V_ACTIVE(timing_data),
- _V_BLANK(timing_data),
- _V_SYNC_OFF(timing_data),
- _V_SYNC_WIDTH(timing_data));
+ printf("\t\ttimings: %d %d %d %d %d %d %d %d %.2f (%s)\n",
+ hdisplay, hsyncstart, hsyncend, htotal,
+ vdisplay, vsyncstart, vsyncend, vtotal, clock,
+ (hsyncend > htotal || vsyncend > vtotal) ?
+ "BAD!" : "good");
}
free(block);
}
More information about the xorg-commit
mailing list