summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGurchetan Singh <gurchetansingh@chromium.org>2021-11-23 00:22:09 +0100
committerGerd Hoffmann <kraxel@redhat.com>2021-11-29 11:46:32 +0100
commit7e78781df491e4beb475bac22e6c44236a5002d7 (patch)
tree2c1717c4b609d95cfa652348c467de517e2ddee8 /include
parentdrm/hyperv: Fix device removal on Gen1 VMs (diff)
downloadlinux-7e78781df491e4beb475bac22e6c44236a5002d7.tar.xz
linux-7e78781df491e4beb475bac22e6c44236a5002d7.zip
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: b10790434cf2 ("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>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/drm/virtgpu_drm.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/drm/virtgpu_drm.h b/include/uapi/drm/virtgpu_drm.h
index a13e20cc66b4..0512fde5e697 100644
--- a/include/uapi/drm/virtgpu_drm.h
+++ b/include/uapi/drm/virtgpu_drm.h
@@ -196,6 +196,13 @@ struct drm_virtgpu_context_init {
__u64 ctx_set_params;
};
+/*
+ * Event code that's given when VIRTGPU_CONTEXT_PARAM_POLL_RINGS_MASK is in
+ * effect. The event size is sizeof(drm_event), since there is no additional
+ * payload.
+ */
+#define VIRTGPU_EVENT_FENCE_SIGNALED 0x90000000
+
#define DRM_IOCTL_VIRTGPU_MAP \
DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map)