drm/virtio: batch plane updates (pageflip)
Move virtio_gpu_notify() to higher-level functions for virtio_gpu_cmd_resource_flush(), virtio_gpu_cmd_set_scanout() and virtio_gpu_cmd_transfer_to_host_{2d,3d}(). virtio_gpu_primary_plane_update() will notify only once for a series of commands (restores plane update command batching). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20200214125535.26349-4-kraxel@redhat.com
This commit is contained in:
@@ -148,6 +148,7 @@ static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
|
||||
plane->state->src_w >> 16,
|
||||
plane->state->src_h >> 16,
|
||||
0, 0);
|
||||
virtio_gpu_notify(vgdev);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -184,6 +185,7 @@ static void virtio_gpu_primary_plane_update(struct drm_plane *plane,
|
||||
rect.y1,
|
||||
rect.x2 - rect.x1,
|
||||
rect.y2 - rect.y1);
|
||||
virtio_gpu_notify(vgdev);
|
||||
}
|
||||
|
||||
static int virtio_gpu_cursor_prepare_fb(struct drm_plane *plane,
|
||||
@@ -262,6 +264,7 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
|
||||
plane->state->crtc_w,
|
||||
plane->state->crtc_h,
|
||||
0, 0, objs, vgfb->fence);
|
||||
virtio_gpu_notify(vgdev);
|
||||
dma_fence_wait(&vgfb->fence->f, true);
|
||||
dma_fence_put(&vgfb->fence->f);
|
||||
vgfb->fence = NULL;
|
||||
|
Reference in New Issue
Block a user