xf86-video-ati: Branch 'master' - 2 commits

Dave Airlie airlied at kemper.freedesktop.org
Tue Apr 1 17:01:35 PDT 2008


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

New commits:
commit a8593482c1f2e0f2dbac06c2e5325ba8c83ed9ff
Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Apr 2 09:58:05 2008 +1000

    atombios: fix the dual-head hopefully.
    
    tested on r600 with DVI and VGA

diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c
index 229ca75..08f8386 100644
--- a/src/atombios_crtc.c
+++ b/src/atombios_crtc.c
@@ -448,10 +448,10 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc,
 
 	OUTREG(AVIVO_D1GRPH_SURFACE_OFFSET_X + radeon_crtc->crtc_offset, 0);
 	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);
-	OUTREG(AVIVO_D1GRPH_X_END + radeon_crtc->crtc_offset, mode->HDisplay);
-	OUTREG(AVIVO_D1GRPH_Y_END + radeon_crtc->crtc_offset, mode->VDisplay);
+	OUTREG(AVIVO_D1GRPH_X_START + radeon_crtc->crtc_offset, x);
+	OUTREG(AVIVO_D1GRPH_Y_START + radeon_crtc->crtc_offset, y);
+	OUTREG(AVIVO_D1GRPH_X_END + radeon_crtc->crtc_offset, x + mode->HDisplay);
+	OUTREG(AVIVO_D1GRPH_Y_END + radeon_crtc->crtc_offset, y + mode->VDisplay);
 	OUTREG(AVIVO_D1GRPH_PITCH + radeon_crtc->crtc_offset,
 	       crtc->scrn->displayWidth);
 	OUTREG(AVIVO_D1GRPH_ENABLE + radeon_crtc->crtc_offset, 1);
commit 61d883d116fab3e9b513432d65e705afc5bb39f1
Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Apr 2 09:57:38 2008 +1000

    Revert "Revert "atombios: fixup the width/height to use the mode values not the scrn ones""
    
    This reverts commit fc9af578997b6f22ee8b17e83f37d98689291b0e.
    
    I see your revert and raise you one...

diff --git a/src/atombios_crtc.c b/src/atombios_crtc.c
index e021bf9..229ca75 100644
--- a/src/atombios_crtc.c
+++ b/src/atombios_crtc.c
@@ -450,13 +450,8 @@ 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->rotation == RR_Rotate_90) || (crtc->rotation == RR_Rotate_270)) {
-		OUTREG(AVIVO_D1GRPH_X_END + radeon_crtc->crtc_offset, crtc->scrn->virtualY);
-		OUTREG(AVIVO_D1GRPH_Y_END + radeon_crtc->crtc_offset, crtc->scrn->virtualX);
-	} else {
-		OUTREG(AVIVO_D1GRPH_X_END + radeon_crtc->crtc_offset, crtc->scrn->virtualX);
-		OUTREG(AVIVO_D1GRPH_Y_END + radeon_crtc->crtc_offset, crtc->scrn->virtualY);
-	}
+	OUTREG(AVIVO_D1GRPH_X_END + radeon_crtc->crtc_offset, mode->HDisplay);
+	OUTREG(AVIVO_D1GRPH_Y_END + radeon_crtc->crtc_offset, mode->VDisplay);
 	OUTREG(AVIVO_D1GRPH_PITCH + radeon_crtc->crtc_offset,
 	       crtc->scrn->displayWidth);
 	OUTREG(AVIVO_D1GRPH_ENABLE + radeon_crtc->crtc_offset, 1);
@@ -467,19 +462,14 @@ atombios_crtc_mode_set(xf86CrtcPtr crtc,
 	/* lock the mode regs */
 	OUTREG(AVIVO_D1SCL_UPDATE + radeon_crtc->crtc_offset, AVIVO_D1SCL_UPDATE_LOCK);
 
-	if ((crtc->rotation == RR_Rotate_90) || (crtc->rotation == RR_Rotate_270))
-		OUTREG(AVIVO_D1MODE_DESKTOP_HEIGHT + radeon_crtc->crtc_offset,
-	       		crtc->scrn->virtualX);
-	else
-		OUTREG(AVIVO_D1MODE_DESKTOP_HEIGHT + radeon_crtc->crtc_offset,
-	       		crtc->scrn->virtualY);
+	OUTREG(AVIVO_D1MODE_DESKTOP_HEIGHT + radeon_crtc->crtc_offset,
+	       		mode->VDisplay);
 	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);
 	/* unlock the mode regs */
 	OUTREG(AVIVO_D1SCL_UPDATE + radeon_crtc->crtc_offset, 0);
 
-	ErrorF("scrn virtual X %d Y %d pitch %d\n", crtc->scrn->virtualX, crtc->scrn->virtualY, crtc->scrn->displayWidth);
     }
 
     atombios_crtc_set_pll(crtc, adjusted_mode);


More information about the xorg-commit mailing list