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

Alex Deucher agd5f at kemper.freedesktop.org
Mon Feb 28 08:30:00 PST 2011


 src/drmmode_display.c |    9 +++++++++
 src/radeon_kms.c      |   42 +++++++++++++++++++++++-------------------
 2 files changed, 32 insertions(+), 19 deletions(-)

New commits:
commit 88304fe9c0ce69012d44a77a5368c35236511dac
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Mon Feb 28 11:29:19 2011 -0500

    kms: don't rotate if acceleration is not enabled
    
    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index a972389..7873d57 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -445,6 +445,8 @@ drmmode_show_cursor (xf86CrtcPtr crtc)
 static void *
 drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
 {
+	ScrnInfoPtr pScrn = crtc->scrn;
+	RADEONInfoPtr info = RADEONPTR(pScrn);
 	drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
 	drmmode_ptr drmmode = drmmode_crtc->drmmode;
 	int size;
@@ -453,6 +455,13 @@ drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height)
 	unsigned long rotate_pitch;
 	int base_align;
 
+	/* rotation requires acceleration */
+	if (info->r600_shadow_fb) {
+		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+			   "Rotation requires acceleration!\n");
+		return NULL;
+	}
+
 	rotate_pitch =
 		RADEON_ALIGN(width, drmmode_get_pitch_align(crtc->scrn, drmmode->cpp, 0)) * drmmode->cpp;
 	height = RADEON_ALIGN(height, drmmode_get_height_align(crtc->scrn, 0));
commit 99141761e947e2153ed1a3bc485dc5716a22acb1
Author: Alex Deucher <alexdeucher at gmail.com>
Date:   Mon Feb 28 11:20:44 2011 -0500

    kms: don't enable tiling if accel is off
    
    Signed-off-by: Alex Deucher <alexdeucher at gmail.com>

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 158dc57..4f6f120 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -625,25 +625,31 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
 	goto fail;
     }
 
-    colorTilingDefault = info->ChipFamily >= CHIP_FAMILY_R300 &&
-                         info->ChipFamily <= CHIP_FAMILY_RS740;
-
-    if (info->ChipFamily >= CHIP_FAMILY_R600) {
-	/* set default group bytes, overridden by kernel info below */
-	info->group_bytes = 256;
-	info->have_tiling_info = FALSE;
-	if (info->dri->pKernelDRMVersion->version_minor >= 6) {
-	    if (r600_get_tile_config(pScrn))
-		info->allowColorTiling = xf86ReturnOptValBool(info->Options,
-							      OPTION_COLOR_TILING, colorTilingDefault);
-	    else
-		info->allowColorTiling = FALSE;
+    if (!RADEONPreInitAccel_KMS(pScrn))              goto fail;
+
+    /* don't enable tiling if accel is not enabled */
+    if (!info->r600_shadow_fb) {
+	colorTilingDefault = info->ChipFamily >= CHIP_FAMILY_R300 &&
+	    info->ChipFamily <= CHIP_FAMILY_RS740;
+
+	if (info->ChipFamily >= CHIP_FAMILY_R600) {
+	    /* set default group bytes, overridden by kernel info below */
+	    info->group_bytes = 256;
+	    info->have_tiling_info = FALSE;
+	    if (info->dri->pKernelDRMVersion->version_minor >= 6) {
+		if (r600_get_tile_config(pScrn))
+		    info->allowColorTiling = xf86ReturnOptValBool(info->Options,
+								  OPTION_COLOR_TILING, colorTilingDefault);
+		else
+		    info->allowColorTiling = FALSE;
+	    } else
+		xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+			   "R6xx+ KMS Color Tiling requires radeon drm 2.6.0 or newer\n");
 	} else
-	    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-		       "R6xx+ KMS Color Tiling requires radeon drm 2.6.0 or newer\n");
+	    info->allowColorTiling = xf86ReturnOptValBool(info->Options,
+							  OPTION_COLOR_TILING, colorTilingDefault);
     } else
-	info->allowColorTiling = xf86ReturnOptValBool(info->Options,
-						      OPTION_COLOR_TILING, colorTilingDefault);
+	info->allowColorTiling = FALSE;
 
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 	 "KMS Color Tiling: %sabled\n", info->allowColorTiling ? "en" : "dis");
@@ -740,8 +746,6 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
 	if (!xf86LoadSubModule(pScrn, "ramdac")) return FALSE;
     }
 
-    if (!RADEONPreInitAccel_KMS(pScrn))              goto fail;
-
     if (pScrn->modes == NULL) {
       xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No modes.\n");
       goto fail;


More information about the xorg-commit mailing list