[PATCH 3/3] drm/virtio: use the fence for every plane update

Dongwon Kim dongwon.kim at intel.com
Wed May 11 00:06:23 UTC 2022


Trying to use the fence to make plane update to wait for the host to
consume the buffer for better synchronization in all cases

Cc: Gurchetan Singh <gurchetansingh at chromium.org>
Cc: Gerd Hoffmann <kraxel at redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy at intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim at intel.com>
---
 drivers/gpu/drm/virtio/virtgpu_plane.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 9856e9941e37..0333181e9dbf 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -142,12 +142,7 @@ static void virtio_gpu_resource_flush(struct drm_plane *plane,
 
 	vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
 	bo = gem_to_virtio_gpu_obj(vgfb->base.obj[0]);
-
-	if (bo && bo->dumb && (plane->state->fb != new_state->fb) &&
-	    ((plane->type == DRM_PLANE_TYPE_PRIMARY && bo->guest_blob) ||
-	    plane->type != DRM_PLANE_TYPE_PRIMARY))
-		fence = virtio_gpu_fence_alloc(vgdev, vgdev->fence_drv.context,
-					       0);
+	fence = virtio_gpu_fence_alloc(vgdev, vgdev->fence_drv.context, 0);
 
 	if (fence) {
 		objs = virtio_gpu_array_alloc(1);
-- 
2.20.1



More information about the dri-devel mailing list