diff options
author | Alex Deucher <alex@cube.(none)> | 2008-02-28 14:29:30 -0500 |
---|---|---|
committer | Alex Deucher <alex@cube.(none)> | 2008-02-28 14:29:30 -0500 |
commit | 46547ae8bdbc5c10f1fd028b95ec4c5c31a5b318 (patch) | |
tree | 64e3a4cfed8158bc54013244756e2f6bf5db1d93 /src/atombios_output.c | |
parent | 72a53d6f20ac29b3baddb7d8af04f19b76d2e04f (diff) |
AVIVO: disable dithering on DFPs
This should fix the color banding some people have noticed.
Also save/restore DDIA regs on RS6xx
Diffstat (limited to 'src/atombios_output.c')
-rw-r--r-- | src/atombios_output.c | 57 |
1 files changed, 46 insertions, 11 deletions
diff --git a/src/atombios_output.c b/src/atombios_output.c index 07d212f7..3b49cde5 100644 --- a/src/atombios_output.c +++ b/src/atombios_output.c @@ -382,6 +382,33 @@ atombios_output_scaler_setup(xf86OutputPtr output, DisplayModePtr mode) } +static void +dfp_disable_dither(xf86OutputPtr output, int device) +{ + RADEONOutputPrivatePtr radeon_output = output->driver_private; + RADEONInfoPtr info = RADEONPTR(output->scrn); + unsigned char *RADEONMMIO = info->MMIO; + + switch (device) { + case ATOM_DEVICE_DFP1_SUPPORT: + OUTREG(AVIVO_TMDSA_BIT_DEPTH_CONTROL, 0); /* TMDSA */ + break; + case ATOM_DEVICE_DFP2_SUPPORT: + if (info->IsIGP) + OUTREG(AVIVO_DDIA_BIT_DEPTH_CONTROL, 0); /* DDIA */ + else + OUTREG(AVIVO_DVOA_BIT_DEPTH_CONTROL, 0); /* DVO */ + break; + case ATOM_DEVICE_LCD1_SUPPORT: + case ATOM_DEVICE_DFP3_SUPPORT: + OUTREG(AVIVO_LVTMA_BIT_DEPTH_CONTROL, 0); /* LVTMA */ + break; + default: + break; + } + +} + static AtomBiosResult atombios_display_device_control(atomBiosHandlePtr atomBIOS, int device, Bool state) { @@ -579,19 +606,27 @@ atombios_output_mode_set(xf86OutputPtr output, atombios_output_dac2_setup(output, adjusted_mode); } } else if (radeon_output->MonType == MT_DFP) { - if (radeon_output->devices & ATOM_DEVICE_DFP1_SUPPORT) - atombios_output_tmds1_setup(output, adjusted_mode); - else if (radeon_output->devices & ATOM_DEVICE_DFP2_SUPPORT) { - if (info->IsIGP) - atombios_ddia_setup(output, adjusted_mode); - else - atombios_external_tmds_setup(output, adjusted_mode); - } else if (radeon_output->devices & ATOM_DEVICE_DFP3_SUPPORT) - atombios_output_tmds2_setup(output, adjusted_mode); + if (radeon_output->devices & ATOM_DEVICE_DFP1_SUPPORT) { + atombios_output_tmds1_setup(output, adjusted_mode); + dfp_disable_dither(output, ATOM_DEVICE_DFP1_SUPPORT); + } else if (radeon_output->devices & ATOM_DEVICE_DFP2_SUPPORT) { + if (info->IsIGP) + atombios_ddia_setup(output, adjusted_mode); + else + atombios_external_tmds_setup(output, adjusted_mode); + dfp_disable_dither(output, ATOM_DEVICE_DFP2_SUPPORT); + } else if (radeon_output->devices & ATOM_DEVICE_DFP3_SUPPORT) { + atombios_output_tmds2_setup(output, adjusted_mode); + dfp_disable_dither(output, ATOM_DEVICE_DFP3_SUPPORT); + } } else if (radeon_output->MonType == MT_LCD) { - if (radeon_output->devices & ATOM_DEVICE_LCD1_SUPPORT) + if (radeon_output->devices & ATOM_DEVICE_LCD1_SUPPORT) { atombios_output_lvds_setup(output, adjusted_mode); - } else if (OUTPUT_IS_TV || (radeon_output->MonType == MT_CV)) { + dfp_disable_dither(output, ATOM_DEVICE_LCD1_SUPPORT); + } + } else if ((radeon_output->MonType == MT_CTV) || + (radeon_output->MonType == MT_STV) || + (radeon_output->MonType == MT_CV)) { if (radeon_output->DACType == DAC_PRIMARY) atombios_output_dac1_setup(output, adjusted_mode); else if (radeon_output->DACType == DAC_TVDAC) |