Commit 6be7e073 authored by Gerd Hoffmann's avatar Gerd Hoffmann

drm/virtio: fix mmap page attributes

virtio-gpu uses cached mappings, set
drm_gem_shmem_object.map_cached accordingly.

Cc: stable@vger.kernel.org
Fixes: c66df701 ("drm/virtio: switch from ttm to gem shmem helpers")
Reported-by: default avatarGurchetan Singh <gurchetansingh@chromium.org>
Reported-by: default avatarGuillaume Gardet <Guillaume.Gardet@arm.com>
Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: default avatarGurchetan Singh <gurchetansingh@chromium.org>
Tested-by: default avatarGuillaume Gardet <Guillaume.Gardet@arm.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200226154752.24328-3-kraxel@redhat.com
parent 1cad6292
...@@ -99,6 +99,7 @@ struct drm_gem_object *virtio_gpu_create_object(struct drm_device *dev, ...@@ -99,6 +99,7 @@ struct drm_gem_object *virtio_gpu_create_object(struct drm_device *dev,
return NULL; return NULL;
bo->base.base.funcs = &virtio_gpu_gem_funcs; bo->base.base.funcs = &virtio_gpu_gem_funcs;
bo->base.map_cached = true;
return &bo->base.base; return &bo->base.base;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment