diff options
author | Gurchetan Singh <gurchetansingh@chromium.org> | 2020-02-24 16:07:58 -0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-02-25 09:48:41 +0100 |
commit | 40cadedd20a5fefba7ebca7cee7a8743a55e2509 (patch) | |
tree | 1e4c7190defe8210501e9f82c5e5cb37383954da /drivers/gpu/drm/virtio/virtgpu_drv.h | |
parent | 30349f8f643febc8d94684bc31e847b84bab2c05 (diff) | |
download | linux-40cadedd20a5fefba7ebca7cee7a8743a55e2509.tar.bz2 |
drm/virtio: factor out context create hypercall
We currently create an OpenGL context when opening the DRM fd
if 3D is available.
We may need other context types (VK,..) in the future, and the plan
is to have explicit initialization for that.
For explicit initialization to work, we need to factor out
virtio_gpu_create_context from driver initialization.
v2: Move context handle initialization too (olv)
v6: Remove redundant 3D check (emil.velikov)
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200225000800.2966-2-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_drv.h')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_drv.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 2f6c4ccbfd14..72c1d9b59dfe 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -214,6 +214,8 @@ struct virtio_gpu_fpriv { /* virtio_ioctl.c */ #define DRM_VIRTIO_NUM_IOCTLS 10 extern struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS]; +void virtio_gpu_create_context(struct drm_device *dev, + struct drm_file *file); /* virtio_kms.c */ int virtio_gpu_init(struct drm_device *dev); |