drm/virtio: add virtio_gpu_is_shmem helper
authorGurchetan Singh <gurchetansingh@chromium.org>
Thu, 27 Feb 2020 00:25:55 +0000 (16:25 -0800)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 27 Feb 2020 10:31:34 +0000 (11:31 +0100)
commit18b39fb975b79d6526449ca7c8ab504bc92e2825
tree8c03dd9b429ab6093e4500f8d456dbaf521da3f5
parent068a8fea373fe79016abf327d88eb733cca8f6a7
drm/virtio: add virtio_gpu_is_shmem helper

The plan is use have both shmem and virtual "vram" running
side-by-side in virtio-gpu. It looks like we'll eventually use
struct drm_gem_object as a base class, and we'll need to convert
to shmem and vram objects on the fly. As a first step, add a
virtio_gpu_is_shmem helper. Thanks to kraxel for suggesting this
approach on Gitlab.

Suggested-by: Gerd Hoffman <kraxel@redhat.com>
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200227002601.745-3-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_object.c