xf86-video-ati: Branch 'master'

Alex Deucher agd5f at kemper.freedesktop.org
Tue Jan 7 07:21:37 PST 2014


 src/evergreen_exa.c    |    5 +++--
 src/r600_exa.c         |    5 +++--
 src/radeon_exa_funcs.c |    5 +++--
 3 files changed, 9 insertions(+), 6 deletions(-)

New commits:
commit bcc454ea2fb239e13942270faec7801270615b9c
Author: Alex Deucher <alexander.deucher at amd.com>
Date:   Mon Jan 6 09:52:50 2014 -0500

    radeon/exa: Always use a scratch surface for UTS to vram
    
    If we don't, we may hit a buffer that crosses the
    visible vram boundary resulting in a sigbus when the
    CPU accesses the buffer beyond the PCI aperture.
    This will introduce an extra copy in certain cases.
    
    This is based on Michel's patch from bug 44099 updated
    for all asic families.
    
    Bug:
    https://bugs.freedesktop.org/show_bug.cgi?id=44099
    
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
index abb5076..d788bfc 100644
--- a/src/evergreen_exa.c
+++ b/src/evergreen_exa.c
@@ -1658,13 +1658,14 @@ EVERGREENUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h,
     if (!driver_priv || !driver_priv->bo)
 	return FALSE;
 
-    /* If we know the BO won't be busy, don't bother with a scratch */
+    /* If we know the BO won't be busy / in VRAM, don't bother with a scratch */
     copy_dst = driver_priv->bo;
     copy_pitch = pDst->devKind;
     if (!(driver_priv->tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO))) {
 	if (!radeon_bo_is_referenced_by_cs(driver_priv->bo, info->cs)) {
 	    flush = FALSE;
-	    if (!radeon_bo_is_busy(driver_priv->bo, &dst_domain))
+	    if (!radeon_bo_is_busy(driver_priv->bo, &dst_domain) &&
+		!(dst_domain & RADEON_GEM_DOMAIN_VRAM))
 		goto copy;
 	}
     }
diff --git a/src/r600_exa.c b/src/r600_exa.c
index a354ccd..8d11ce7 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -1538,13 +1538,14 @@ R600UploadToScreenCS(PixmapPtr pDst, int x, int y, int w, int h,
     if (!driver_priv || !driver_priv->bo)
 	return FALSE;
 
-    /* If we know the BO won't be busy, don't bother with a scratch */
+    /* If we know the BO won't be busy / in VRAM, don't bother with a scratch */
     copy_dst = driver_priv->bo;
     copy_pitch = pDst->devKind;
     if (!(driver_priv->tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO))) {
 	if (!radeon_bo_is_referenced_by_cs(driver_priv->bo, info->cs)) {
 	    flush = FALSE;
-	    if (!radeon_bo_is_busy(driver_priv->bo, &dst_domain))
+	    if (!radeon_bo_is_busy(driver_priv->bo, &dst_domain) &&
+		!(dst_domain & RADEON_GEM_DOMAIN_VRAM))
 		goto copy;
 	}
 	/* use cpu copy for fast fb access */
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c
index d9340c5..d901305 100644
--- a/src/radeon_exa_funcs.c
+++ b/src/radeon_exa_funcs.c
@@ -403,13 +403,14 @@ RADEONUploadToScreenCS(PixmapPtr pDst, int x, int y, int w, int h,
     }
 #endif
 
-    /* If we know the BO won't be busy, don't bother with a scratch */
+    /* If we know the BO won't be busy / in VRAM, don't bother with a scratch */
     copy_dst = driver_priv->bo;
     copy_pitch = pDst->devKind;
     if (!(driver_priv->tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO))) {
 	if (!radeon_bo_is_referenced_by_cs(driver_priv->bo, info->cs)) {
 	    flush = FALSE;
-	    if (!radeon_bo_is_busy(driver_priv->bo, &dst_domain))
+	    if (!radeon_bo_is_busy(driver_priv->bo, &dst_domain) &&
+		!(dst_domain & RADEON_GEM_DOMAIN_VRAM))
 		goto copy;
 	}
 	/* use cpu copy for fast fb access */


More information about the xorg-commit mailing list