diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-04 17:26:47 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-04 17:26:47 +0000 |
commit | b82bfcb54a6af0d1ee17806ef94d9da504cad606 (patch) | |
tree | 35edd21c6bba3b95f701ea6de9acba771c47876d /src/sna/gen6_render.c | |
parent | 626dd1324dd2c5b14ca4aff598b5eb1e45550e69 (diff) |
sna/gen6+: Cache the scanout targets separately to avoid override PTE caching
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen6_render.c')
-rw-r--r-- | src/sna/gen6_render.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sna/gen6_render.c b/src/sna/gen6_render.c index 033f1cba..37064608 100644 --- a/src/sna/gen6_render.c +++ b/src/sna/gen6_render.c @@ -1220,9 +1220,10 @@ gen6_bind_bo(struct sna *sna, uint32_t *ss; uint32_t domains; uint16_t offset; + uint32_t is_scanout = is_dst && bo->scanout; /* After the first bind, we manage the cache domains within the batch */ - offset = kgem_bo_get_binding(bo, format); + offset = kgem_bo_get_binding(bo, format | is_scanout << 31); if (offset) { DBG(("[%x] bo(handle=%d), format=%d, reuse %s binding\n", offset, bo->handle, format, @@ -1249,9 +1250,9 @@ gen6_bind_bo(struct sna *sna, ss[3] = (gen6_tiling_bits(bo->tiling) | (bo->pitch - 1) << GEN6_SURFACE_PITCH_SHIFT); ss[4] = 0; - ss[5] = is_dst && bo->scanout ? 0 : 3 << 16; + ss[5] = is_scanout ? 0 : 3 << 16; - kgem_bo_set_binding(bo, format, offset); + kgem_bo_set_binding(bo, format, offset | is_scanout << 31); DBG(("[%x] bind bo(handle=%d, addr=%d), format=%d, width=%d, height=%d, pitch=%d, tiling=%d -> %s\n", offset, bo->handle, ss[1], |