diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-03-23 01:37:15 +0000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-03-23 01:37:15 +0000 |
commit | 17c52ff15ebe2cf220d5988ee13b599c41799886 (patch) | |
tree | 36f04c5caaaef6ee09ef7208b1162087fab2524f | |
parent | 673e4d7501861066fdd0874919a4524b820b944b (diff) |
Call RADEONRestoreCommonRegisters() before RADEONRestoreCrtc2Registers()
instead of after. I can't find any good reason why we did it backward
until now and it definitely causes problems as the workaround for VT
switch in RADEONRestoreCommonRegisters() will break output to the
secondary head in various situations. Also does an unrelated minor
update to a comment.
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | src/radeon_driver.c | 14 |
2 files changed, 21 insertions, 5 deletions
@@ -1,3 +1,15 @@ +2006-03-23 Benjamin Herrenschmidt <benh@kernel.crashing.org> + + * src/radeon_driver.c: (RADEONRestoreMode), + (RADEONInitCrtcRegisters), (RADEONInitCrtc2Registers): + Call RADEONRestoreCommonRegisters() before + RADEONRestoreCrtc2Registers() instead of after. I can't find any good + reason why we did it backward until now and it definitely causes + problems as the workaround for VT switch in + RADEONRestoreCommonRegisters() will break output to the secondary head + in various situations. Also does an unrelated minor update to a + comment. + 2006-03-22 Kristian Høgsberg <krh@redhat.com> * src/Makefile.am (EXTRA_DIST): Add atipciids.h. diff --git a/src/radeon_driver.c b/src/radeon_driver.c index 33c3e0e..2dad663 100644 --- a/src/radeon_driver.c +++ b/src/radeon_driver.c @@ -1,5 +1,5 @@ /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v 1.117 2004/02/19 22:38:12 tsi Exp $ */ -/* $XdotOrg: driver/xf86-video-ati/src/radeon_driver.c,v 1.106 2006/03/18 00:08:24 benh Exp $ */ +/* $XdotOrg: driver/xf86-video-ati/src/radeon_driver.c,v 1.107 2006/03/22 22:30:14 krh Exp $ */ /* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and * VA Linux Systems Inc., Fremont, California. @@ -6989,6 +6989,7 @@ static void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore) */ if (info->IsSecondary) { RADEONRestoreMemMapRegisters(pScrn, restore); + RADEONRestoreCommonRegisters(pScrn, &restore0); RADEONRestoreCrtc2Registers(pScrn, restore); RADEONRestorePLL2Registers(pScrn, restore); @@ -7000,7 +7001,6 @@ static void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore) if (pRADEONEnt->RestorePrimary) { pRADEONEnt->RestorePrimary = FALSE; - RADEONRestoreCommonRegisters(pScrn, &restore0); RADEONRestoreCrtcRegisters(pScrn, &restore0); RADEONRestoreFPRegisters(pScrn, &restore0); RADEONRestorePLLRegisters(pScrn, &restore0); @@ -7008,6 +7008,7 @@ static void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore) } } else { RADEONRestoreMemMapRegisters(pScrn, restore); + RADEONRestoreCommonRegisters(pScrn, &restore0); if (info->MergedFB) { RADEONRestoreCrtc2Registers(pScrn, restore); RADEONRestorePLL2Registers(pScrn, restore); @@ -7017,7 +7018,6 @@ static void RADEONRestoreMode(ScrnInfoPtr pScrn, RADEONSavePtr restore) info->IsSwitching) { pRADEONEnt->IsSecondaryRestored = FALSE; - RADEONRestoreCommonRegisters(pScrn, restore); RADEONRestoreCrtcRegisters(pScrn, restore); RADEONRestoreFPRegisters(pScrn, restore); RADEONRestorePLLRegisters(pScrn, restore); @@ -7879,7 +7879,9 @@ static Bool RADEONInitCrtcRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save, save->disp_merge_cntl &= ~RADEON_DISP_RGB_OFFSET_EN; #if X_BYTE_ORDER == X_BIG_ENDIAN - /* Alhought we current onlu use aperture 0, also setting aperture 1 should not harm -ReneR */ + /* We must set both apertures as they can be both used to map the entire + * video memory. -BenH. + */ switch (pScrn->bitsPerPixel) { case 16: save->surface_cntl |= RADEON_NONSURF_AP0_SWP_16BPP; @@ -8100,7 +8102,9 @@ static Bool RADEONInitCrtc2Registers(ScrnInfoPtr pScrn, RADEONSavePtr save, /* We must set SURFACE_CNTL properly on the second screen too */ save->surface_cntl = 0; #if X_BYTE_ORDER == X_BIG_ENDIAN - /* Alhought we current onlu use aperture 0, also setting aperture 1 should not harm -ReneR */ + /* We must set both apertures as they can be both used to map the entire + * video memory. -BenH. + */ switch (pScrn->bitsPerPixel) { case 16: save->surface_cntl |= RADEON_NONSURF_AP0_SWP_16BPP; |