diff options
author | Tobias Diedrich <ranma+freedesktop@tdiedrich.de> | 2008-05-20 19:16:54 -0400 |
---|---|---|
committer | Alex Deucher <alex@botch2.com> | 2008-05-20 19:16:54 -0400 |
commit | b7c80d0c86646105d2bce5d4d59ba6c45aa7cafc (patch) | |
tree | b9617b7b4f9bd630c7f9fac170820c65961e8400 /src/radeon_video.c | |
parent | 69423482e2e94637142a9ba675589a1449a346a8 (diff) |
R200/R300: fix gamma setup for overlay
More pending. See bug 16001
Diffstat (limited to 'src/radeon_video.c')
-rw-r--r-- | src/radeon_video.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c index ab1ed8dd..4a5d6e80 100644 --- a/src/radeon_video.c +++ b/src/radeon_video.c @@ -687,9 +687,9 @@ static GAMMA_CURVE_R100 gamma_curve_r100[8] = static GAMMA_CURVE_R200 gamma_curve_r200[8] = { /* Gamma 1.0 */ - {0x00000040, 0x00000000, - 0x00000040, 0x00000020, - 0x00000080, 0x00000040, + {0x00000100, 0x00000000, + 0x00000100, 0x00000020, + 0x00000100, 0x00000040, 0x00000100, 0x00000080, 0x00000100, 0x00000100, 0x00000100, 0x00000100, @@ -858,7 +858,10 @@ RADEONSetOverlayGamma(ScrnInfoPtr pScrn, uint32_t gamma) /* Set gamma */ RADEONWaitForIdleMMIO(pScrn); ov0_scale_cntl = INREG(RADEON_OV0_SCALE_CNTL) & ~RADEON_SCALER_GAMMA_SEL_MASK; - OUTREG(RADEON_OV0_SCALE_CNTL, ov0_scale_cntl | (gamma << 0x00000005)); + if (info->ChipFamily < CHIP_FAMILY_R200) + OUTREG(RADEON_OV0_SCALE_CNTL, ov0_scale_cntl | (gamma << 5)); + else + OUTREG(RADEON_OV0_SCALE_CNTL, ov0_scale_cntl); /* Load gamma curve adjustments */ if (info->ChipFamily >= CHIP_FAMILY_R200) { |