summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);