summaryrefslogtreecommitdiff
path: root/src/atombios_crtc.c
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 /src/atombios_crtc.c
parentd1add18f3d238c755f9875b5e5c211e4af742482 (diff)
AVIVO: fix panning
low 2 bits of X need to be 0.
Diffstat (limited to 'src/atombios_crtc.c')
-rw-r--r--src/atombios_crtc.c4
1 files changed, 3 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);