]> git.baikalelectronics.ru Git - kernel.git/commit
drm/virtgpu api: define a dummy fence signaled event
authorGurchetan Singh <gurchetansingh@chromium.org>
Mon, 22 Nov 2021 23:22:09 +0000 (15:22 -0800)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 29 Nov 2021 10:46:32 +0000 (11:46 +0100)
commitfe5d085f7d7c1773eefb7a6d5c835cc77a7c839b
tree2c1717c4b609d95cfa652348c467de517e2ddee8
parent116c6aebe9ef0a7949e356c51a20448ee9cf9674
drm/virtgpu api: define a dummy fence signaled event

The current virtgpu implementation of poll(..) drops events
when VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK is enabled (otherwise
it's like a normal DRM driver).

This is because paravirtualized userspaces receives responses in a
buffer of type BLOB_MEM_GUEST, not by read(..).

To be in line with other DRM drivers and avoid specialized behavior,
it is possible to define a dummy event for virtgpu.  Paravirtualized
userspace will now have to call read(..) on the DRM fd to receive the
dummy event.

Fixes: 30d61cdd9d6d ("drm/virtgpu api: create context init feature")
Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20211122232210.602-2-gurchetansingh@google.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_ioctl.c
include/uapi/drm/virtgpu_drm.h