diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-13 08:27:05 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-13 08:27:05 +0100 |
commit | 8e743ccef8f19b1226ceb8d6a5ceab65584a620d (patch) | |
tree | bbf777e686a948300a773e012480e3a84757ea14 /src/sna/gen8_render.c | |
parent | 7bc669dd4b7e3e5978e95e4131d1f9215afbc041 (diff) |
sna/gen8: Check for WT support before attempting to use the WT mocs
It appears the kernel has a better idea when WT is supported on which
gen8 parts. I assumed it was always supported, but experience suggests
otherwise, so only use WT support when advertised.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79967
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/gen8_render.c')
-rw-r--r-- | src/sna/gen8_render.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/gen8_render.c b/src/sna/gen8_render.c index 466fe01a..a48ccf4f 100644 --- a/src/sna/gen8_render.c +++ b/src/sna/gen8_render.c @@ -1377,7 +1377,7 @@ gen8_bind_bo(struct sna *sna, domains = I915_GEM_DOMAIN_RENDER << 16 |I915_GEM_DOMAIN_RENDER; } else domains = I915_GEM_DOMAIN_SAMPLER << 16; - ss[1] = bo->io ? 0 : is_scanout ? (MOCS_WT | MOCS_ALL_CACHES) << 24 : (MOCS_WB | MOCS_ALL_CACHES) << 24; + ss[1] = is_uncached(sna, bo) ? 0 : is_scanout ? (MOCS_WT | MOCS_ALL_CACHES) << 24 : (MOCS_WB | MOCS_ALL_CACHES) << 24; ss[2] = ((width - 1) << SURFACE_WIDTH_SHIFT | (height - 1) << SURFACE_HEIGHT_SHIFT); ss[3] = (bo->pitch - 1) << SURFACE_PITCH_SHIFT; |