drm/virtio: enqueue virtio_gpu_create_context after the first 3D ioctl
authorGurchetan Singh <gurchetansingh@chromium.org>
Tue, 25 Feb 2020 00:08:00 +0000 (16:08 -0800)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 25 Feb 2020 08:48:42 +0000 (09:48 +0100)
commit72b48ae800da8ac7d9a43dc667745eee5b5d28a5
treee6a1027b7e897b0cf2a620467c1d79394a66a7e6
parentd2a983b220ac6628c53e4cf27a7335d1d29ce5e9
drm/virtio: enqueue virtio_gpu_create_context after the first 3D ioctl

For old userspace, initialization will still be implicit.

For backwards compatibility, enqueue virtio_gpu_cmd_context_create after
the first 3D ioctl.

v3: staticify virtio_gpu_create_context
    remove notify to batch vm-exit
v6: Remove nested 3D checks (emil.velikov):
      - unify 3D check in resource create
v7: Remove check when getting capabilities

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-4-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