diff options
author | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-10-11 00:16:45 -0400 |
---|---|---|
committer | Alex Deucher <alex@t41p.hsd1.va.comcast.net> | 2007-10-11 00:16:45 -0400 |
commit | 7afd04c1e4ffa6e4e5ba08ae90ba002237dc282b (patch) | |
tree | 6e7e8b006e3c71e52441d2ef2ca0e304861431ab /src/radeon_crtc.c | |
parent | 1b231d28fdda5cdc44bb9d2075d4edfd8f17e21f (diff) |
RADEON: tell the bios not to muck with the hardware while the driver is active
by toggling the appropriate bios scratch regs you can tell
the bios not the touch the hw while the driver is active.
This should prevent the bios from scrambling the hardware
when users open the lid or toggle bios hotkeys.
fixes bug 12567
Diffstat (limited to 'src/radeon_crtc.c')
-rw-r--r-- | src/radeon_crtc.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c index 47e46f38..ca554d28 100644 --- a/src/radeon_crtc.c +++ b/src/radeon_crtc.c @@ -768,6 +768,18 @@ RADEONInitPLL2Registers(ScrnInfoPtr pScrn, RADEONSavePtr save, } static void +RADEONInitBIOSRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save) +{ + RADEONInfoPtr info = RADEONPTR(pScrn); + + /* tell the bios not to muck with the hardware on events */ + save->bios_4_scratch = 0; + save->bios_5_scratch = 0xff00; + save->bios_6_scratch = info->SavedReg.bios_6_scratch | 0x40000000; + +} + +static void radeon_update_tv_routing(ScrnInfoPtr pScrn, RADEONSavePtr restore) { /* pixclks_cntl controls tv clock routing */ @@ -813,6 +825,9 @@ radeon_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, } } + if (info->IsMobility) + RADEONInitBIOSRegisters(pScrn, &info->ModeReg); + ErrorF("init memmap\n"); RADEONInitMemMapRegisters(pScrn, &info->ModeReg, info); ErrorF("init common\n"); @@ -868,6 +883,9 @@ radeon_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, } } + if (info->IsMobility) + RADEONRestoreBIOSRegisters(pScrn, &info->ModeReg); + ErrorF("restore memmap\n"); RADEONRestoreMemMapRegisters(pScrn, &info->ModeReg); ErrorF("restore common\n"); |