summaryrefslogtreecommitdiff
path: root/src/atombios_crtc.c
diff options
context:
space:
mode:
authorAlex Deucher <alex@botch2.(none)>2007-11-08 18:39:23 -0500
committerAlex Deucher <alex@botch2.(none)>2007-11-08 18:39:23 -0500
commit2dcb852778301b9284a2b4906dcf64f95ed638b7 (patch)
treeaaeeb8c708b2cc844e7e3473617050bfbd25d0d1 /src/atombios_crtc.c
parent96273016a0bbdfa4d3a4e6275a3b09eeeadaa534 (diff)
pull in another of Dave's fixes
Diffstat (limited to 'src/atombios_crtc.c')
-rw-r--r--src/atombios_crtc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c
index f15c7079..3a748fc4 100644
--- a/src/atombios_crtc.c
+++ b/src/atombios_crtc.c
@@ -401,6 +401,15 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc,
OUTREG(AVIVO_CRTC1_PITCH + radeon_crtc->crtc_offset,
crtc->scrn->displayWidth);
+ /* avivo can only shift offset by 4 pixel in x if you program somethings
+ * not multiple of 4 you gonna drive the GPU crazy and likely won't
+ * be able to restore it without cold reboot (vbe post not enough)
+ */
+ x = x & ~3;
+ OUTREG(AVIVO_CRTC1_OFFSET_END + radeon_crtc->crtc_offset,
+ ((mode->HDisplay + x -128) << 16) | (mode->VDisplay + y - 128));
+ OUTREG(AVIVO_CRTC1_OFFSET_START + radeon_crtc->crtc_offset, (x << 16) | y);
+
OUTREG(AVIVO_CRTC1_SCAN_ENABLE + radeon_crtc->crtc_offset, 1);
}