xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Wed Oct 15 07:53:35 PDT 2008


 src/atombios_output.c |   28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

New commits:
commit 435cf7da68186f2601c4b888296117d4f652c625
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Wed Oct 15 10:52:14 2008 -0400

    Add LCD dithering quirk for macbook pro
    
    fixes bug 17897.

diff --git a/src/atombios_output.c b/src/atombios_output.c
index 148a1da..24acbd7 100644
--- a/src/atombios_output.c
+++ b/src/atombios_output.c
@@ -43,6 +43,8 @@
 #include "radeon_macros.h"
 #include "radeon_atombios.h"
 
+#include "ati_pciids_gen.h"
+
 static int
 atombios_output_dac1_setup(xf86OutputPtr output, DisplayModePtr mode)
 {
@@ -894,6 +896,30 @@ atombios_set_output_crtc_source(xf86OutputPtr output)
     return;
 }
 
+static void
+atombios_apply_output_quirks(xf86OutputPtr output)
+{
+    RADEONOutputPrivatePtr radeon_output = output->driver_private;
+    RADEONInfoPtr info       = RADEONPTR(output->scrn);
+    unsigned char *RADEONMMIO = info->MMIO;
+
+    /* Funky macbooks */
+    if ((info->Chipset == PCI_CHIP_RV530_71C5) &&
+	(PCI_SUB_VENDOR_ID(info->PciInfo) == 0x106b) &&
+	(PCI_SUB_DEVICE_ID(info->PciInfo) == 0x0080)) {
+	if (radeon_output->MonType == MT_LCD) {
+	    if (radeon_output->devices & ATOM_DEVICE_LCD1_SUPPORT) {
+		uint32_t lvtma_bit_depth_control = INREG(AVIVO_LVTMA_BIT_DEPTH_CONTROL);
+
+		lvtma_bit_depth_control &= ~AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_EN;
+		lvtma_bit_depth_control &= ~AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN;
+
+		OUTREG(AVIVO_LVTMA_BIT_DEPTH_CONTROL, lvtma_bit_depth_control);
+	    }
+	}
+    }
+}
+
 void
 atombios_output_mode_set(xf86OutputPtr output,
 			 DisplayModePtr mode,
@@ -955,7 +981,7 @@ atombios_output_mode_set(xf86OutputPtr output,
 	    atombios_output_dac2_setup(output, adjusted_mode);
 	atombios_output_tv1_setup(output, adjusted_mode);
     }
-
+    atombios_apply_output_quirks(output);
 }
 
 static AtomBiosResult


More information about the xorg-commit mailing list