drm/virtio: rework notification for better batching
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 14 Feb 2020 12:55:30 +0000 (13:55 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 17 Feb 2020 13:50:48 +0000 (14:50 +0100)
commitcca41da1001157c95c7bc4d5cc9488232ef686d9
tree7932979458dc2aff7f967c57570b4c82a624de89
parent28f2aff1caa4997f58ca31179cad1b4a84a62827
drm/virtio: rework notification for better batching

Drop the virtio_gpu_{disable,enable}_notify().  Add a new
virtio_gpu_notify() call instead, which must be called whenever
the driver wants make sure the host is notified needed.

Drop automatic notification from command submission.  Add
virtio_gpu_notify() calls after each command query instead.
This allows more fine-grained control over host notification
and can move around the notify calls in subsequent patches to
batch command submissions. With this in place it is also
possible to make notification optional for userspace ioctls.

Page flip batching goes away (temporarely).

v3:
 - move batching to separate patches.
v2:
 - rebase to latest drm-misc-next.
 - use "if (!atomic_read())".
 - add review & test tags.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200214125535.26349-2-kraxel@redhat.com
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_plane.c
drivers/gpu/drm/virtio/virtgpu_vq.c