diff options
author | Mike Isely <isely@pobox.com> | 2008-05-08 10:00:17 +0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-05-08 10:00:17 +0800 |
commit | 9f324860431ff8199a78d19bbaa74046e1476b89 (patch) | |
tree | ee802c8c02190dab1b80b9f4345289553ee5fdc0 /src | |
parent | 33f033cbf346c13a687e469e8879579fcd5bb2fb (diff) |
Implement option to ignore external fixed mode settings
The Intel xorg driver tries mightily to determine the native fixed
panel mode settings for the LVDS output. It does this through various
means, including scanning video BIOS tables, and noticing if the pipe
in question has already been set up by somebody else (and adopting
those timings). This strategy works well for say a laptop where the
LCD panel is an integral part of the machine. But for other
applications where the display is unrelated to the system's BIOS or
other software, then the BIOS will likely have no clue how to
configure the LVDS output. Worse still, the BIOS can simply "get it
wrong", leaving the pipe misconfigured. Unfortunately the Intel
driver can potentially notice this, adopt the same settings, leaving a
messed up display.
All of this complexity normally happens independently, behind the
scenes, from the mode timings that might otherwise be specified by the
user. This driver has a concept of fixed, i.e. "native" mode, and
then user-specified mode. If the corresponding resolutions between
those concepts don't match, then the driver in theory will arrange for
scaling to take place while adhering to the actual native mode of the
panel. Said another way, if the user says 800x600 but the driver
mistakenly (see above) thinks the native mode is 640x480, then 640x480
is the mode set with scaling to an 800x600 frame buffer. If the
driver gets the wrong native mode, then the result is a miserable mess
with no way for the user to override what the driver thinks is right.
This patch provides a means to override the driver. This implements a
new driver option, "LVDSFixedMode" which defaults to true (the normal,
probe-what-I-need behavior). However when set to false, then all the
guessing is skipped and the driver will assume no fixed, i.e. "native"
mode for the display device. Instead with this option set to false,
the driver will directly set the timings specified by the user,
providing an escape hatch for situations where the driver can't
correctly figure out the right mode.
Under most scenarios of course, this option should not be needed. But
in situations where the Intel video BIOS is hopelessly fouled up
related to the LVDS output, this option provides the escape hatch for
the user to get a working display in spite of the BIOS situation.
Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/i830.h | 1 | ||||
-rw-r--r-- | src/i830_driver.c | 8 | ||||
-rw-r--r-- | src/i830_lvds.c | 10 |
3 files changed, 19 insertions, 0 deletions
@@ -655,6 +655,7 @@ typedef struct _I830Rec { /** Enables logging of debug output related to mode switching. */ Bool debug_modes; + Bool lvds_fixed_mode; unsigned int quirk_flag; } I830Rec; diff --git a/src/i830_driver.c b/src/i830_driver.c index 44c510c0..662b3e43 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -305,6 +305,7 @@ typedef enum { #ifdef XF86DRI_MM OPTION_INTELTEXPOOL, #endif + OPTION_LVDSFIXEDMODE, OPTION_TRIPLEBUFFER, OPTION_FORCEENABLEPIPEA, #ifdef INTEL_XVMC @@ -332,6 +333,7 @@ static OptionInfoRec I830Options[] = { #ifdef XF86DRI_MM {OPTION_INTELTEXPOOL,"Legacy3D", OPTV_BOOLEAN, {0}, FALSE}, #endif + {OPTION_LVDSFIXEDMODE, "LVDSFixedMode", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_TRIPLEBUFFER, "TripleBuffer", OPTV_BOOLEAN, {0}, FALSE}, {OPTION_FORCEENABLEPIPEA, "ForceEnablePipeA", OPTV_BOOLEAN, {0}, FALSE}, #ifdef INTEL_XVMC @@ -1416,6 +1418,12 @@ I830PreInit(ScrnInfoPtr pScrn, int flags) pI830->lvds_24_bit_mode = FALSE; } + if (xf86ReturnOptValBool(pI830->Options, OPTION_LVDSFIXEDMODE, TRUE)) { + pI830->lvds_fixed_mode = TRUE; + } else { + pI830->lvds_fixed_mode = FALSE; + } + if (xf86ReturnOptValBool(pI830->Options, OPTION_FORCEENABLEPIPEA, FALSE)) pI830->quirk_flag |= QUIRK_PIPEA_FORCE; diff --git a/src/i830_lvds.c b/src/i830_lvds.c index 1562c217..48402dfa 100644 --- a/src/i830_lvds.c +++ b/src/i830_lvds.c @@ -1228,6 +1228,14 @@ i830_lvds_init(ScrnInfoPtr pScrn) */ I830I2CInit(pScrn, &intel_output->pDDCBus, GPIOC, "LVDSDDC_C"); + if (!pI830->lvds_fixed_mode) { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Skipping any attempt to determine panel fixed mode.\n"); + goto skip_panel_fixed_mode_setup; + } + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Attempting to determine panel fixed mode.\n"); + /* Attempt to get the fixed panel mode from DDC. Assume that the preferred * mode is the right one. */ @@ -1311,6 +1319,8 @@ i830_lvds_init(ScrnInfoPtr pScrn) goto disable_exit; } + skip_panel_fixed_mode_setup: + /* Blacklist machines with BIOSes that list an LVDS panel without actually * having one. */ |