summaryrefslogtreecommitdiff
path: root/src/i830_display.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_display.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_display.c')
-rw-r--r--src/i830_display.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/i830_display.c b/src/i830_display.c
index 4f3f8ef9..4091e792 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -1289,10 +1289,21 @@ i830_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode,
else
lvds &= ~(LVDS_B0B3_POWER_UP | LVDS_CLKB_POWER_UP);
- /* It would be nice to set 24 vs 18-bit mode (LVDS_A3_POWER_UP)
- * appropriately here, but we need to look more thoroughly into how
- * panels behave in the two modes.
- */
+ if (pI830->lvds_24_bit_mode) {
+ /* Option set which requests 24-bit mode
+ * (LVDS_A3_POWER_UP, as opposed to 18-bit mode) here; we
+ * still need to look more thoroughly into how panels
+ * behave in the two modes. This option enables that
+ * experimentation.
+ */
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Selecting less common 24 bit TMDS pixel format.\n");
+ lvds |= LVDS_A3_POWER_UP;
+ lvds |= LVDS_DATA_FORMAT_DOT_ONE;
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Selecting standard 18 bit TMDS pixel format.\n");
+ }
/* Enable dithering if we're in 18-bit mode. */
if (IS_I965G(pI830))