]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit017368f18efc499e05cdb9891f6437ef39e0f529
tree7932979458dc2aff7f967c57570b4c82a624de89
parent54a380eff1570df28333ea97d48286c82a9c2cd5
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