Message ID | 20191211081810.20079-3-kraxel@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/virtio: fix mmap page attributes | expand |
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);
virtio-gpu uses cached mappings, set shmem->caching accordingly. Reported-by: Gurchetan Singh <gurchetansingh@chromium.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- drivers/gpu/drm/virtio/virtgpu_object.c | 1 + 1 file changed, 1 insertion(+)