OSDN Git Service

i965: Make sure we don't use CPU maps for the scanout buffer.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 3 Apr 2017 07:03:01 +0000 (00:03 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 10 Apr 2017 21:30:49 +0000 (14:30 -0700)
commit915820cc59c3b28754db3ab8eb0f06782506d11d
treefd2949198b0305b61400cae64d6802e521fb5239
parenteb28ce2b0bd28296d70ffaa9c7ffb7fd078eb993
i965: Make sure we don't use CPU maps for the scanout buffer.

Using an incoherent CPU map on the active scanout buffer is really
sketchy - we may need extra flushing via GEM_SW_FINISH, or using
drmModeDirtyFB() and kernel commit a6a7cc4b7db6d (4.10+).

Chris suggests "never ever do that", which seems like a wise plan!

intel_miptree_map_raw() uses CPU maps on linear buffers.

Having a linear scanout buffer should be really rare, and mapping the
front buffer should be similarly rare.  Together, it should basically
never happen.  But, in case it does somehow...make sure that mapping
the scanout buffer always goes through an uncached GTT map.

v2: Add a giant comment written by Chris Wilson.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c