Hi

Am 23.10.25 um 08:22 schrieb Kasireddy, Vivek:
[...]
Here's another variant of the patch for you to test. This should resolve
the warning.
This new patch does not work (meaning FPS is low/inconsistent) while testing
my use-case. However, it does work if I invert the visibility check:
diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c 
b/drivers/gpu/drm/virtio/virtgpu_plane.c
index 31f6548ef0fe..1ee8924b12c8 100644
--- a/drivers/gpu/drm/virtio/virtgpu_plane.c
+++ b/drivers/gpu/drm/virtio/virtgpu_plane.c
@@ -129,7 +129,7 @@ static int virtio_gpu_plane_atomic_check(struct drm_plane 
*plane,
                                                   is_cursor, true);
         if (ret)
                 return ret;
-       else if (new_plane_state->visible)
+       if (!new_plane_state->visible)
                 return 0

Oops, that's a bug in the patch. Thanks for the fix.


Also, I think you might want to limit the plane sync to host mechanism to just 
guest
blobs only because based on what Dmitry said the vblank timer helps in 
virgl/venus/
native context use-cases. That is,
@@ -138,7 +140,7 @@ static int virtio_gpu_plane_atomic_check(struct drm_plane 
*plane,
         for (i = 0; i < new_plane_state->fb->format->num_planes; ++i) {
                 struct virtio_gpu_object *bo = 
gem_to_virtio_gpu_obj(new_plane_state->fb->obj[i]);

-               if (bo->host3d_blob || bo->guest_blob) {
+               if (bo->guest_blob && !vgdev->has_virgl_3d) {

I've been looking at [1] for the test. In this case, I expected the output to be in sync already. I've also found that test in several other places. But OK, no problem.

[1] https://elixir.bootlin.com/linux/v6.17.4/source/drivers/gpu/drm/virtio/virtgpu_plane.c#L282

Best regards
Thomas

                         vgcrtc_state->plane_synced_to_host |= 
drm_plane_mask(plane);
                         break; /* only need to find one */
                 }

Thanks,
Vivek

Best regards
Thomas


--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)

--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)


Reply via email to