From: Gerd Hoffmann <kraxel@xxxxxxxxxx> commit 6be7e07335486f5731cab748d80c68f20896581f upstream. virtio-gpu uses cached mappings, set drm_gem_shmem_object.map_cached accordingly. Cc: stable@xxxxxxxxxxxxxxx Fixes: c66df701e783 ("drm/virtio: switch from ttm to gem shmem helpers") Reported-by: Gurchetan Singh <gurchetansingh@xxxxxxxxxxxx> Reported-by: Guillaume Gardet <Guillaume.Gardet@xxxxxxx> Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx> Reviewed-by: Gurchetan Singh <gurchetansingh@xxxxxxxxxxxx> Tested-by: Guillaume Gardet <Guillaume.Gardet@xxxxxxx> Link: http://patchwork.freedesktop.org/patch/msgid/20200226154752.24328-3-kraxel@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/virtio/virtgpu_object.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -99,6 +99,7 @@ struct drm_gem_object *virtio_gpu_create return NULL; bo->base.base.funcs = &virtio_gpu_gem_funcs; + bo->base.map_cached = true; return &bo->base.base; }