xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Fri Feb 6 16:45:16 PST 2009


 src/atombios_crtc.c |   22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

New commits:
commit bba5d806cc46328ad9e4c521bfeeb2a59f96862b
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Fri Feb 6 19:44:17 2009 -0500

    AVIVO: better fix for rotation
    
    This should handle initial rotation as well.

diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c
index e86f186..e79ba13 100644
--- a/src/atombios_crtc.c
+++ b/src/atombios_crtc.c
@@ -455,6 +455,23 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc,
 	    x = 0;
 	    y = 0;
 	    fb_location = fb_location + (char *)crtc->rotatedData - (char *)info->FB;
+	    switch (crtc->rotation) {
+	    case RR_Rotate_0:
+	    case RR_Rotate_180:
+		OUTREG(AVIVO_D1GRPH_X_END + radeon_crtc->crtc_offset, pScrn->virtualX);
+		OUTREG(AVIVO_D1GRPH_Y_END + radeon_crtc->crtc_offset, pScrn->virtualY);
+	    default:
+		break;
+	    case RR_Rotate_90:
+	    case RR_Rotate_270:
+		OUTREG(AVIVO_D1GRPH_X_END + radeon_crtc->crtc_offset, pScrn->virtualY);
+		OUTREG(AVIVO_D1GRPH_Y_END + radeon_crtc->crtc_offset, pScrn->virtualX);
+		break;
+
+	    }
+	} else {
+	    OUTREG(AVIVO_D1GRPH_X_END + radeon_crtc->crtc_offset, pScrn->virtualX);
+	    OUTREG(AVIVO_D1GRPH_Y_END + radeon_crtc->crtc_offset, pScrn->virtualY);
 	}
 
 	OUTREG(AVIVO_D1GRPH_PRIMARY_SURFACE_ADDRESS + radeon_crtc->crtc_offset, fb_location);
@@ -465,11 +482,6 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc,
 	OUTREG(AVIVO_D1GRPH_SURFACE_OFFSET_Y + radeon_crtc->crtc_offset, 0);
 	OUTREG(AVIVO_D1GRPH_X_START + radeon_crtc->crtc_offset, 0);
 	OUTREG(AVIVO_D1GRPH_Y_START + radeon_crtc->crtc_offset, 0);
-	if (crtc->rotatedData == NULL) {
-	    /* rotation changes the virtualX and virtualY */
-	    OUTREG(AVIVO_D1GRPH_X_END + radeon_crtc->crtc_offset, pScrn->virtualX);
-	    OUTREG(AVIVO_D1GRPH_Y_END + radeon_crtc->crtc_offset, pScrn->virtualY);
-	}
 	OUTREG(AVIVO_D1GRPH_PITCH + radeon_crtc->crtc_offset,
 	       crtc->scrn->displayWidth);
 	OUTREG(AVIVO_D1GRPH_ENABLE + radeon_crtc->crtc_offset, 1);


More information about the xorg-commit mailing list