Skip to contentSkip to conversation

drm/virtio: Enable fb damage clips property for the primary plane

PATCH Applied Javier Martinez Canillas 3 participants 5 messages Mar 10, 2023 – Mar 13, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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
index 4c09e313bebc..a2e045f3a000 100644
@@ -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
maintainer Reviewed-by on v1 1/1
#1 lore raw

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.

---

  drivers/gpu/drm/virtio/virtgpu_plane.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/virtio/virtgpu_plane.c +0 -0
index 4c09e313bebc..a2e045f3a000 100644
@@ -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 -0
  		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 · 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
#2 lore raw

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.

---

  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
index 4c09e313bebc..a2e045f3a000 100644
@@ -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

Thanks!

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat
maintainer Acked-by on v1 1/1
#3 lore raw
In reply to Javier Martinez Canillas
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.

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#4 lore raw
In reply to Javier Martinez Canillas
Quoted 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.

---

Pushed to drm-misc (drm-misc-next). Thanks!

Signature · 5 lines
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat