OSDN Git Service

minigbm: virtio-gpu: bo_invalidate fixes
authorDavid Stevens <stevensd@chromium.org>
Thu, 24 Oct 2019 05:59:31 +0000 (14:59 +0900)
committerchrome-bot <chrome-bot@chromium.org>
Sat, 26 Oct 2019 12:05:14 +0000 (05:05 -0700)
commit4d5358d32cdf2afa2fd10b09c002751eed2c4cdc
tree8400ff12645edd7d9153ad8cee157c13e3ae07df
parent8312ec228d0c96e4c7cca85b8fd141dd6dd9e15e
minigbm: virtio-gpu: bo_invalidate fixes

When invalidating a buffer, minigbm needs to ensure that the
host-to-guest transfer completes before returning from invalidate, to
prevent the host from overwriting subsequent guest changes.

However, invalidate is only necessary when the host can modify the
buffer. For now, just check for buffers the virtio gpu device can write
to (BO_USE_RENDERING). More flags can be added later for other virtio
devices.

BUG=b:142687692
TEST=manual - Launch play store and verify there is no black app window.
Change-Id: Id9475e6037ff667324f4fd95a94b1723c18ea2d2
Reviewed-on: https://chromium-review.googlesource.com/1875897
Tested-by: David Stevens <stevensd@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Lepton Wu <lepton@chromium.org>
virtio_gpu.c