summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-03-16 04:32:22 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-03-16 04:32:22 +0000
commit901409f47cc990721c1648b1c08e23450e6a4452 (patch)
treeffa2fe801e035a6e755fea7953f84a702982b25c
parent4d6656062129da0489eb4bc898871379ba891d8f (diff)
Fix incorrect CRTC2_OFFSET values when using old-style dual head (not
MergedFB). Fixes Xinerama for me.
-rw-r--r--ChangeLog7
-rw-r--r--src/radeon_driver.c15
2 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 6e56c2f2..59c2704e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2006-03-16 Benjamin Herrenschmidt <benh@kernel.crashing.org>
+ * src/radeon_driver.c: (RADEONInitCrtcRegisters),
+ (RADEONInitCrtc2Registers), (RADEONDoAdjustFrame):
+ Fix incorrect CRTC2_OFFSET values when using old-style dual head (not
+ MergedFB). Fixes Xinerama for me.
+
+2006-03-16 Benjamin Herrenschmidt <benh@kernel.crashing.org>
+
* src/radeon_driver.c: (RADEONWaitForVerticalSync),
(RADEONWaitForVerticalSync2), (RADEONLoadPalette),
(RADEONScreenInit), (RADEONRestoreMemMapRegisters),
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index b90c305f..3288fdfb 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.101 2006/03/15 04:03:37 benh Exp $ */
+/* $XdotOrg: driver/xf86-video-ati/src/radeon_driver.c,v 1.102 2006/03/16 03:09:34 benh Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
* VA Linux Systems Inc., Fremont, California.
@@ -7824,7 +7824,7 @@ static Bool RADEONInitCrtcRegisters(ScrnInfoPtr pScrn, RADEONSavePtr save,
? RADEON_CRTC_V_SYNC_POL
: 0));
- save->crtc_offset = 0;
+ save->crtc_offset = pScrn->fbOffset;
save->crtc_offset_cntl = INREG(RADEON_CRTC_OFFSET_CNTL);
if (info->tilingEnabled) {
if (IS_R300_VARIANT)
@@ -8019,7 +8019,7 @@ static Bool RADEONInitCrtc2Registers(ScrnInfoPtr pScrn, RADEONSavePtr save,
/* It seems all fancy options apart from pflip can be safely disabled
*/
- save->crtc2_offset = 0;
+ save->crtc2_offset = pScrn->fbOffset;
save->crtc2_offset_cntl = INREG(RADEON_CRTC2_OFFSET_CNTL) & RADEON_CRTC_OFFSET_FLIP_CNTL;
if (info->tilingEnabled) {
if (IS_R300_VARIANT)
@@ -8827,13 +8827,14 @@ void RADEONDoAdjustFrame(ScrnInfoPtr pScrn, int x, int y, int clone)
}
}
else {
- Base += y * info->CurrentLayout.displayWidth + x;
+ int offset = y * info->CurrentLayout.displayWidth + x;
switch (info->CurrentLayout.pixel_code) {
case 15:
- case 16: Base *= 2; break;
- case 24: Base *= 3; break;
- case 32: Base *= 4; break;
+ case 16: offset *= 2; break;
+ case 24: offset *= 3; break;
+ case 32: offset *= 4; break;
}
+ Base += offset;
}
Base &= ~7; /* 3 lower bits are always 0 */