diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-01-26 14:58:28 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-02-24 12:21:00 -0800 |
commit | 84f48228237037737b615946699071d5b88ccb4c (patch) | |
tree | 0fab69b0eafbbf2da8f500963e08f7f3591d986a | |
parent | 8cb4d68089109f6cef0ce94429ba6f944910c646 (diff) |
Fixup bogus VBT modes when detected
Several VBT modes out in the wild have H or VSyncEnd values greater than
the H or VTotal value. This clearly ends up creating a bad mode,
causing some panels to either ignore the timing or display some sort of
corrupt image.
Check for these cases and fix them up by default, making things work for
several Dell and Sony machines.
Fixes FDO bug #17292.
(cherry picked from commit 57a02b50c60c10a25ff0f3cd93af9f37fa0d1b11)
-rw-r--r-- | src/i830_bios.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/i830_bios.c b/src/i830_bios.c index 72408f0f..6baacd48 100644 --- a/src/i830_bios.c +++ b/src/i830_bios.c @@ -135,6 +135,12 @@ parse_panel_data(I830Ptr pI830, struct bdb_header *bdb) fixed_mode->Clock = _PIXEL_CLOCK(timing_ptr) / 1000; fixed_mode->type = M_T_PREFERRED; + /* Some VBTs have bogus h/vtotal values */ + if (fixed_mode->HSyncEnd > fixed_mode->HTotal) + fixed_mode->HTotal = fixed_mode->HSyncEnd + 1; + if (fixed_mode->VSyncEnd > fixed_mode->VTotal) + fixed_mode->VTotal = fixed_mode->VSyncEnd + 1; + xf86SetModeDefaultName(fixed_mode); pI830->lvds_fixed_mode = fixed_mode; |