summaryrefslogtreecommitdiff
path: root/src/i830_driver.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2008-04-09 14:15:03 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2008-04-09 14:15:03 +0800
commite031cc02e65acfbafb48136dad414751e04425c5 (patch)
tree74cd9cece306a6ba4d3531702a655c33e4f2180f /src/i830_driver.c
parent79b18980ac9f60b1978abe421352df965aed1681 (diff)
Implement support for 24 bit pixel format
The Intel driver appears to be coded to only work with displays expecting 18 bit pixels. However I have an application using a LCD display that expects pixel data in 24 bit format. The difference is only 2 bits in a single GPU register. This patch implements that change, controlled by a new driver option, "LVDS24Bit". The default value is false, which is the previous behavior. When set to true, then 24 bit panels should work (at least the one I'm testing here does). Fd.o bug #15201 Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'src/i830_driver.c')
-rw-r--r--src/i830_driver.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/i830_driver.c b/src/i830_driver.c
index a19c8ebf..66153b76 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -296,6 +296,7 @@ typedef enum {
OPTION_COLOR_KEY,
OPTION_CHECKDEVICES,
OPTION_MODEDEBUG,
+ OPTION_LVDS24BITMODE,
OPTION_FBC,
OPTION_TILING,
#ifdef XF86DRI_MM
@@ -322,6 +323,7 @@ static OptionInfoRec I830Options[] = {
{OPTION_VIDEO_KEY, "VideoKey", OPTV_INTEGER, {0}, FALSE},
{OPTION_CHECKDEVICES, "CheckDevices",OPTV_BOOLEAN, {0}, FALSE},
{OPTION_MODEDEBUG, "ModeDebug", OPTV_BOOLEAN, {0}, FALSE},
+ {OPTION_LVDS24BITMODE, "LVDS24Bit", OPTV_BOOLEAN, {0}, FALSE},
{OPTION_FBC, "FramebufferCompression", OPTV_BOOLEAN, {0}, TRUE},
{OPTION_TILING, "Tiling", OPTV_BOOLEAN, {0}, TRUE},
#ifdef XF86DRI_MM
@@ -1398,6 +1400,12 @@ I830PreInit(ScrnInfoPtr pScrn, int flags)
pI830->debug_modes = FALSE;
}
+ if (xf86ReturnOptValBool(pI830->Options, OPTION_LVDS24BITMODE, FALSE)) {
+ pI830->lvds_24_bit_mode = TRUE;
+ } else {
+ pI830->lvds_24_bit_mode = FALSE;
+ }
+
if (xf86ReturnOptValBool(pI830->Options, OPTION_FORCEENABLEPIPEA, FALSE))
pI830->quirk_flag |= QUIRK_PIPEA_FORCE;