summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@FreeBSD.org>2006-04-16 13:13:42 -0500
committerEric Anholt <anholt@FreeBSD.org>2006-04-16 13:13:42 -0500
commitee7be006b63b6b1ce7f786b045fb8f26d337433c (patch)
treed9b17ffc1fa7650c3d5295222854b852038bca48
parent786ee3df1726f08953167d05f7fa1930452703bb (diff)
Bug #6589: Use alternate offsets to successfully get at the panel data for
some broken video BIOSes.
-rw-r--r--src/i830_bios.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/i830_bios.c b/src/i830_bios.c
index c9ca8819..00cec522 100644
--- a/src/i830_bios.c
+++ b/src/i830_bios.c
@@ -173,6 +173,21 @@ i830GetLVDSInfoFromBIOS(ScrnInfoPtr pScrn)
timing_ptr = pI830->VBIOS + bdb_off +
lvds2->panels[panel_type].fp_edid_dtd_offset;
+ if (fpparam->terminator != 0xffff) {
+ /* Apparently the offsets are wrong for some BIOSes, so we
+ * try the other offsets if we find a bad terminator.
+ */
+ fpparam = (struct lvds_bdb_2_fp_params *)(pI830->VBIOS +
+ bdb_off + lvds2->panels[panel_type].fp_params_offset + 8);
+ fptiming = (struct lvds_bdb_2_fp_edid_dtd *)(pI830->VBIOS +
+ bdb_off + lvds2->panels[panel_type].fp_edid_dtd_offset + 8);
+ timing_ptr = pI830->VBIOS + bdb_off +
+ lvds2->panels[panel_type].fp_edid_dtd_offset + 8;
+
+ if (fpparam->terminator != 0xffff)
+ continue;
+ }
+
pI830->PanelXRes = fpparam->x_res;
pI830->PanelYRes = fpparam->y_res;
xf86DrvMsg(pScrn->scrnIndex, X_INFO,