OSDN Git Service

minigbm: i915: use I915_MMAP_WC in certain cases
authorGurchetan Singh <gurchetansingh@chromium.org>
Tue, 19 Sep 2017 22:10:58 +0000 (15:10 -0700)
committerchrome-bot <chrome-bot@chromium.org>
Thu, 28 Sep 2017 06:52:09 +0000 (23:52 -0700)
commit5af202315b9e595a007e74f67dbc0d521c2aa05d
treea58e1ccd546422136b361b6516a60bd917359b96
parent254dbb19c49fad4ab4f28b2d1f2982bd10bb7c0b
minigbm: i915: use I915_MMAP_WC in certain cases

The Zero Latency Ink app is scanned out while the buffer is being
updated (by design). The buffer update is racy with the display,
leading to artifacts. Calling clflush on the buffer, even only on
the rectangle specified by gralloc (*lock), makes no difference. As
a result, let's map the buffer as uncached when it's being scanned
out (we do the same thing on ARM). Let's make sure not affect
renderscript buffers, since certain renderscript CTS tests require
caching.

BUG=chromium:762324
TEST=no overlay artifacts while using Zero Latency Ink app
     on Eve.

Change-Id: I6f79dc8e48deee441790f737aba79c7f79ca4cb9
Reviewed-on: https://chromium-review.googlesource.com/665390
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: David Reveman <reveman@chromium.org>
i915.c