summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/virtio/virtgpu_drv.h
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-12-12 13:53:45 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-12-16 12:39:50 +0100
commit7082e7a438db2abf13e4e1fa904875034de88b6b (patch)
tree05ef7538a0397e8bb2e0cc3117b02fa985ab60b8 /drivers/gpu/drm/virtio/virtgpu_drv.h
parent3954ff10e06e4fbc548fc02ff1fcaaac3228fed5 (diff)
downloadlinux-7082e7a438db2abf13e4e1fa904875034de88b6b.tar.bz2
drm/virtio: batch display update commands.
When the driver submits multiple commands in a row it makes sense to notify the host only after submitting the last one, so the host can process them all at once, with a single vmexit. Add functions to enable/disable notifications to allow that. Use the new functions for primary plane updates. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20191212125346.8334-3-kraxel@redhat.com
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_drv.h')
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_drv.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h
index eedae2a7b532..29cf005ed6b9 100644
--- a/drivers/gpu/drm/virtio/virtgpu_drv.h
+++ b/drivers/gpu/drm/virtio/virtgpu_drv.h
@@ -183,6 +183,9 @@ struct virtio_gpu_device {
struct kmem_cache *vbufs;
bool vqs_ready;
+ bool disable_notify;
+ bool pending_notify;
+
struct ida resource_ida;
wait_queue_head_t resp_wq;
@@ -335,6 +338,9 @@ void virtio_gpu_dequeue_ctrl_func(struct work_struct *work);
void virtio_gpu_dequeue_cursor_func(struct work_struct *work);
void virtio_gpu_dequeue_fence_func(struct work_struct *work);
+void virtio_gpu_disable_notify(struct virtio_gpu_device *vgdev);
+void virtio_gpu_enable_notify(struct virtio_gpu_device *vgdev);
+
/* virtio_gpu_display.c */
int virtio_gpu_framebuffer_init(struct drm_device *dev,
struct virtio_gpu_framebuffer *vgfb,