drm/virtio: create context before RESOURCE_CREATE_2D in 3D mode
authorGurchetan Singh <gurchetansingh@chromium.org>
Fri, 1 May 2020 18:55:57 +0000 (11:55 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 4 May 2020 07:53:37 +0000 (09:53 +0200)
commitc3e2850a9b68a62e7949633102d0351773846136
treedae7a7ad11e08d8911cc183f9c02fb2ebcac00ee
parent6f49c2515e2258f08f2b905c9772dbf729610415
drm/virtio: create context before RESOURCE_CREATE_2D in 3D mode

If 3D is enabled, but userspace requests a dumb buffer, we will
call CTX_ATTACH_RESOURCE before actually creating the context.

Fixes: 72b48ae800da ("drm/virtio: enqueue virtio_gpu_create_context after the first 3D ioctl")
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200501185557.740-1-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_gem.c
drivers/gpu/drm/virtio/virtgpu_ioctl.c