summaryrefslogtreecommitdiff
path: root/src/radeon_exa_funcs.c
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-08-07 11:56:49 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-08-07 11:56:49 +0200
commite755fa56d03aa338d0c6345ed41e32aa3115ad4b (patch)
tree2a69c6527e0b6f95834aa1b30b41cbad8504b1a4 /src/radeon_exa_funcs.c
parent4cebafae81c1738a1c330d52a2c5248869f06411 (diff)
Minor fixes for KMS EXA DownloadFromScreen hook.
Check we can handle the bpp, and remove superfluous flush.
Diffstat (limited to 'src/radeon_exa_funcs.c')
-rw-r--r--src/radeon_exa_funcs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c
index 30d299f8..dc56c55a 100644
--- a/src/radeon_exa_funcs.c
+++ b/src/radeon_exa_funcs.c
@@ -522,11 +522,11 @@ RADEONDownloadFromScreenCS(PixmapPtr pSrc, int x, int y, int w,
uint32_t scratch_pitch = (w * bpp / 8 + 63) & ~63;
Bool r;
+ if (bpp < 8)
+ return FALSE;
+
driver_priv = exaGetPixmapDriverPrivate(pSrc);
- /* if we have more refs than just the BO then flush */
- if (driver_priv->bo->cref)
- radeon_cs_flush_indirect(pScrn);
- radeon_bo_wait(driver_priv->bo);
+
size = scratch_pitch * h;
scratch = radeon_bo_open(info->bufmgr, 0, size, 0, RADEON_GEM_DOMAIN_GTT, 0);
if (scratch == NULL) {