drm/virtio: Enable fb damage clips property for the primary plane
Subsystems (4)
PATCH 1/1 drm/virtio: Enable fb damage clips property for the primary plane
Christian Hergert reports that the driver doesn't enable the property and that leads to always doing a full plane update, even when the driver does support damage clipping for the primary plane.
Don't enable it for the cursor plane, because its .atomic_update callback doesn't handle damage clips.
---
drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/virtio/virtgpu_plane.c +4 -0
@@ -390,5 +390,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,return plane;drm_plane_helper_add (plane, funcs); + +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_enable_fb_damage_clips (plane); +return plane; }
base-commit: 3e853b9f89e4bcc8aa342fa350d83ff0df67d7e9
Signature · 1 line
2.39.2
Hi Javier
Am 10.03.23 um 13:59 schrieb Javier Martinez Canillas:
drivers/gpu/drm/virtio/virtgpu_plane.c struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,
Quoted 19 lines
Christian Hergert reports that the driver doesn't enable the property and that leads to always doing a full plane update, even when the driver does support damage clipping for the primary plane.
Don't enable it for the cursor plane, because its .atomic_update callback doesn't handle damage clips.
Reported-by Christian Hergert <[email protected]>Signed-off-by Javier Martinez Canillas <[email protected]>---
drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/virtio/virtgpu_plane.c +0
-0@@ -390,5 +390,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,
virtio_gpu_plane_init() should really be two separate functions. But withing the constrains of the current code
Best regards
Thomas
Quoted 11 lines
drivers/gpu/drm/virtio/virtgpu_plane.c +4
-0return plane;drm_plane_helper_add (plane, funcs); + +if (type ==DRM_PLANE_TYPE_PRIMARY ) +drm_plane_enable_fb_damage_clips (plane); +return plane; }base-commit:
3e853b9f89e4bcc8aa342fa350d83ff0df67d7e9
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
Thomas Zimmermann <[email protected]> writes:
Hello Thomas,
Quoted 17 lines
Hi Javier
Am 10.03.23 um 13:59 schrieb Javier Martinez Canillas:
Quoted 14 lines
Christian Hergert reports that the driver doesn't enable the property and that leads to always doing a full plane update, even when the driver does support damage clipping for the primary plane.
Don't enable it for the cursor plane, because its .atomic_update callback doesn't handle damage clips.
Reported-by Christian Hergert <[email protected]>Signed-off-by Javier Martinez Canillas <[email protected]>---
drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++ 1 file changed, 4 insertions(+)
Quoted 9 lines
drivers/gpu/drm/virtio/virtgpu_plane.c struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,
Quoted 5 lines
drivers/gpu/drm/virtio/virtgpu_plane.c +0
-0@@ -390,5 +390,9 @@ struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev,
virtio_gpu_plane_init()should really be two separate functions. But withing the constrains of the current code
Agreed, I thought the same. I may post a follow-up patch once this lands.
Quoted 2 lines
Reviewed-by Thomas Zimmermann <[email protected]>
Thanks!
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat
Quoted 9 lines · Javier Martinez Canillas
Christian Hergert reports that the driver doesn't enable the property and that leads to always doing a full plane update, even when the driver does support damage clipping for the primary plane.
Don't enable it for the cursor plane, because its .atomic_update callback doesn't handle damage clips.
Reported-by Christian Hergert <[email protected]>Signed-off-by Javier Martinez Canillas <[email protected]>
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Javier Martinez Canillas
AppliedQuoted 10 lines · Javier Martinez Canillas
Christian Hergert reports that the driver doesn't enable the property and that leads to always doing a full plane update, even when the driver does support damage clipping for the primary plane.
Don't enable it for the cursor plane, because its .atomic_update callback doesn't handle damage clips.
Reported-by Christian Hergert <[email protected]>Signed-off-by Javier Martinez Canillas <[email protected]>---
Pushed to drm-misc (drm-misc-next). Thanks!
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat