virtio-gpu uses cached mappings, set shmem->caching accordingly. Reported-by: Gurchetan Singh <gurchetansingh at chromium.org> Signed-off-by: Gerd Hoffmann <kraxel at redhat.com> --- drivers/gpu/drm/virtio/virtgpu_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 017a9e0fc3bb..a0b5e5195816 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -118,6 +118,7 @@ int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, shmem_obj = drm_gem_shmem_create(vgdev->ddev, params->size); if (IS_ERR(shmem_obj)) return PTR_ERR(shmem_obj); + shmem_obj->caching = DRM_GEM_SHMEM_CACHED; bo = gem_to_virtio_gpu_obj(&shmem_obj->base); ret = virtio_gpu_resource_id_get(vgdev, &bo->hw_res_handle); -- 2.18.1