[PATCH 3/6] RADEONDownloadFromScreenCS: flush CS writes before mapping BO for read

Michel Dänzer michel at daenzer.net
Tue Aug 31 02:25:56 PDT 2010


On Mon, 2010-08-23 at 19:41 +1200, Karl Tomlinson wrote: 
> 
> If unflushed CS operations write to the pixmap BO, then these need to be
> flushed before mapping the BO for read.  This currently only affects big
> endian systems and only when the operation writes to the GTT domain.

[...]


> @@ -593,6 +596,10 @@ RADEONDownloadFromScreenCS(PixmapPtr pSrc, int x, int y, int w,
>  	if ((src_domain & (RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM)) ==
>  	    (RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM))
>  	    src_domain = 0;
> +#if X_BYTE_ORDER == X_BIG_ENDIAN
> +	else /* A write may be scheduled */
> +	    flush = TRUE;
> +#endif
>      }

It should be possible to determine with certainty if the unflushed CS
writes to the BO or not, e.g. by looking at the destination domain? (I'm
wondering if we shouldn't take that into account for guessing where the
BO ends up as well...)


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-driver-ati mailing list