drm/virtio: make sure context is created in gem open
authorChia-I Wu <olvaffe@gmail.com>
Thu, 7 Jan 2021 21:07:26 +0000 (13:07 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Mar 2021 10:37:38 +0000 (11:37 +0100)
commitdfc846691a667bf1025a1444a14eede14ce21904
tree5e220a4ca2b9c91ed009481d55fef7eec576c233
parent74cfb7883a043c84e540360daf4b46d675684de1
drm/virtio: make sure context is created in gem open

[ Upstream commit 8aeef9d4f48917ce85710949b079548974b4a638 ]

The context might still be missing when DRM_IOCTL_PRIME_FD_TO_HANDLE is
the first ioctl on the drm_file.

Fixes: 72b48ae800da ("drm/virtio: enqueue virtio_gpu_create_context after the first 3D ioctl")
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20210107210726.269584-1-olvaffe@gmail.com
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/virtio/virtgpu_gem.c