diff options
author | Arkadiusz Miskiewicz <arekm@maven.pl> | 2007-11-26 12:43:30 -0500 |
---|---|---|
committer | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-11-26 12:43:30 -0500 |
commit | 6f080d00e6f4f84d5e0d6b4eff302bf42c230e81 (patch) | |
tree | 4af5c21bb5c12a5f336fd9f49112a3e63cfb46ba /src/radeon_driver.c | |
parent | dcf22aed87366f4625fb5042cb84fecccd9ceece (diff) |
RADEON: fix backlight control on some laptops
It seems the bios scratch regs are involved in backlight control
on some laptops. This patch fixes the problematic laptops and doesn't
seem to break the previous bios lid and output control fixes.
Diffstat (limited to 'src/radeon_driver.c')
-rw-r--r-- | src/radeon_driver.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c index c55b5a5..0465497 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -4041,10 +4041,13 @@ void RADEONRestoreBIOSRegisters(ScrnInfoPtr pScrn, RADEONSavePtr restore) { RADEONInfoPtr info = RADEONPTR(pScrn); unsigned char *RADEONMMIO = info->MMIO; + CARD32 bios_5_scratch = INREG(RADEON_BIOS_5_SCRATCH); CARD32 bios_6_scratch = INREG(RADEON_BIOS_6_SCRATCH); OUTREG(RADEON_BIOS_4_SCRATCH, restore->bios_4_scratch); - OUTREG(RADEON_BIOS_5_SCRATCH, restore->bios_5_scratch); + bios_5_scratch &= 0xF; + bios_5_scratch |= (restore->bios_5_scratch & ~0xF); + OUTREG(RADEON_BIOS_5_SCRATCH, bios_5_scratch); if (restore->bios_6_scratch & 0x40000000) bios_6_scratch |= 0x40000000; else |