By separating the OUT_FENCE signalling from pageflip completion allows a Guest compositor to start a new repaint cycle with a new buffer instead of waiting for the old buffer to be free.
This work is based on the idea/suggestion from Simon and Pekka.
This capability can be a solution for this issue: https://gitlab.freedesktop.org/wayland/weston/-/issues/514
Corresponding Weston MR: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/668
Cc: Daniel Vetter daniel@ffwll.ch Cc: Gerd Hoffmann kraxel@redhat.com Cc: Pekka Paalanen ppaalanen@gmail.com Cc: Simon Ser contact@emersion.fr Cc: Michel Dänzer michel@daenzer.net Cc: Tina Zhang tina.zhang@intel.com Cc: Dongwon Kim dongwon.kim@intel.com
Vivek Kasireddy (4): drm: Add a capability flag to support deferred out_fence signalling virtio-gpu uapi: Add VIRTIO_GPU_F_OUT_FENCE feature drm/virtio: Add VIRTIO_GPU_CMD_RESOURCE_OUT_FENCE cmd drm/virtio: Probe and implement VIRTIO_GPU_F_OUT_FENCE feature
drivers/gpu/drm/drm_file.c | 11 +++--- drivers/gpu/drm/drm_ioctl.c | 3 ++ drivers/gpu/drm/virtio/virtgpu_debugfs.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.c | 1 + drivers/gpu/drm/virtio/virtgpu_drv.h | 6 ++++ drivers/gpu/drm/virtio/virtgpu_fence.c | 9 +++++ drivers/gpu/drm/virtio/virtgpu_kms.c | 10 ++++-- drivers/gpu/drm/virtio/virtgpu_plane.c | 44 +++++++++++++++++++++++- drivers/gpu/drm/virtio/virtgpu_vq.c | 17 +++++++++ include/drm/drm_mode_config.h | 9 +++++ include/uapi/drm/drm.h | 1 + include/uapi/linux/virtio_gpu.h | 12 +++++++ 12 files changed, 117 insertions(+), 7 deletions(-)