summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-03-09 15:13:01 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-03-09 15:13:01 -0400
commit1d355798f3d421cabf2a3a0ba32a580483476ab0 (patch)
treec767d60280947b5dc2225a802dc66dfeea62f70f
parentd1add18f3d238c755f9875b5e5c211e4af742482 (diff)
AVIVO: fix panning
low 2 bits of X need to be 0.
-rw-r--r--src/atombios_crtc.c4
-rw-r--r--src/radeon_crtc.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c
index bf207bf6..c0047191 100644
--- a/src/atombios_crtc.c
+++ b/src/atombios_crtc.c
@@ -1,4 +1,4 @@
- /*
+/*
* Copyright © 2007 Red Hat, Inc.
* Copyright 2007 Advanced Micro Devices, Inc.
*
@@ -469,6 +469,8 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc,
OUTREG(AVIVO_D1GRPH_ENABLE + radeon_crtc->crtc_offset, 1);
OUTREG(AVIVO_D1MODE_DESKTOP_HEIGHT + radeon_crtc->crtc_offset, mode->VDisplay);
+ x &= ~3;
+ y &= ~1;
OUTREG(AVIVO_D1MODE_VIEWPORT_START + radeon_crtc->crtc_offset, (x << 16) | y);
OUTREG(AVIVO_D1MODE_VIEWPORT_SIZE + radeon_crtc->crtc_offset,
(mode->HDisplay << 16) | mode->VDisplay);
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index a87e99ba..3a9432fc 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -507,6 +507,8 @@ radeon_crtc_set_origin(xf86CrtcPtr crtc, int x, int y)
unsigned char *RADEONMMIO = info->MMIO;
if (IS_AVIVO_VARIANT) {
+ x &= ~3;
+ y &= ~1;
atombios_lock_crtc(info->atomBIOS, radeon_crtc->crtc_id, 1);
OUTREG(AVIVO_D1MODE_VIEWPORT_START + radeon_crtc->crtc_offset, (x << 16) | y);
atombios_lock_crtc(info->atomBIOS, radeon_crtc->crtc_id, 0);