]> git.baikalelectronics.ru Git - kernel.git/commit
drm/virtio: factor out context create hypercall
authorGurchetan Singh <gurchetansingh@chromium.org>
Tue, 25 Feb 2020 00:07:58 +0000 (16:07 -0800)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 25 Feb 2020 08:48:41 +0000 (09:48 +0100)
commit959e1c48c0c23bf2d96f669cf1ffaac6f6ca124a
tree1e4c7190defe8210501e9f82c5e5cb37383954da
parent0530b42dcf28be62779baba3f1c56791ce4d4c1f
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>
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_ioctl.c
drivers/gpu/drm/virtio/virtgpu_kms.c