diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index f937c4e..25fbf5c 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -631,13 +631,21 @@ RADEONDownloadFromScreenCP(PixmapPtr pSrc, int x, int y, int w, int h, | (info->gartLocation + info->dri->bufStart + scratch->idx * scratch->total) >> 10; drm_radeon_indirect_t indirect; + /* if the xfer is small, do the blit twice to make sure data hits + * gart + */ + int small_image = (w < 32 || h < 32); ACCEL_PREAMBLE(); RADEON_SWITCH_TO_2D(); /* Kick the first blit as early as possible */ RADEONBlitChunk(pScrn, NULL, NULL, datatype, src_pitch_offset, - scratch_pitch_offset, x, y, 0, 0, w, hpass, 0, 0); + scratch_pitch_offset, x, y, 0, 0, w, hpass, 0, 0); + if (small_image) { + RADEONBlitChunk(pScrn, NULL, NULL, datatype, src_pitch_offset, + scratch_pitch_offset, x, y, 0, 0, w, hpass, 0, 0); + } FLUSH_RING(); #if X_BYTE_ORDER == X_BIG_ENDIAN @@ -664,8 +672,13 @@ RADEONDownloadFromScreenCP(PixmapPtr pSrc, int x, int y, int w, int h, if (hpass) { scratch_off = scratch->total/2 - scratch_off; RADEONBlitChunk(pScrn, NULL, NULL, datatype, src_pitch_offset, - scratch_pitch_offset + (scratch_off >> 10), + scratch_pitch_offset + (scratch_off >> 10), x, y, 0, 0, w, hpass, 0, 0); + if (small_image) { + RADEONBlitChunk(pScrn, NULL, NULL, datatype, src_pitch_offset, + scratch_pitch_offset + (scratch_off >> 10), + x, y, 0, 0, w, hpass, 0, 0); + } } /*