Skip to contentSkip to conversation

drm/udl: Enable damage clipping

PATCH In review Thomas Zimmermann 2 participants 4 messages Jul 28, 2022 – Sep 7, 2022

Subsystems (3)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/1 drm/udl: Enable damage clipping

Call drm_plane_enable_fb_damage_clips() and give userspace a chance of minimizing the updated display area.

---
 drivers/gpu/drm/udl/udl_modeset.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/udl/udl_modeset.c +1 -0
index e67c40a48fb4..ce427128f034 100644
@@ -479,6 +479,7 @@ int udl_modeset_init(struct drm_device *dev)
 					   format_count, NULL, connector);
 	if (ret)
 		return ret;
+	drm_plane_enable_fb_damage_clips(&udl->display_pipe.plane);
 
 	drm_mode_config_reset(dev);
 
Signature · 1 line
2.37.1
#1 lore raw
Quoted 13 lines · Thomas Zimmermann

Call drm_plane_enable_fb_damage_clips() and give userspace a chance of minimizing the updated display area.

---
 drivers/gpu/drm/udl/udl_modeset.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/udl/udl_modeset.c +0 -0
index e67c40a48fb4..ce427128f034 100644

drivers/gpu/drm/udl/udl_modeset.c int udl_modeset_init(struct drm_device *dev) · line 482

Quoted 4 lines
drivers/gpu/drm/udl/udl_modeset.c +1 -0
@@ -479,6 +479,7 @@ int udl_modeset_init(struct drm_device *dev)
 					   format_count, NULL, connector);
 	if (ret)
 		return ret;
+	drm_plane_enable_fb_damage_clips(&udl->display_pipe.plane);

I'm assuming this passes with all the igts we have (I hope those finally landed) and a damage-capable compositor doesn't go boom either?

Either way patch lgtm. Reviewed-by: Daniel Vetter <[email protected]>

Also I wonder whether we should have a check in the damage helpers to make sure drivers don't forget to call this function to set up the uapi ...

Cheers, Daniel

Quoted 6 lines
drivers/gpu/drm/udl/udl_modeset.c +0 -0
 	drm_mode_config_reset(dev);
 
Signature · 1 line
2.37.1
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
author maintainer
#2 lore raw

Hi

Am 06.09.22 um 21:35 schrieb Daniel Vetter:

Quoted 22 lines · Thomas Zimmermann
Quoted 13 lines

Call drm_plane_enable_fb_damage_clips() and give userspace a chance of minimizing the updated display area.

---
  drivers/gpu/drm/udl/udl_modeset.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/udl/udl_modeset.c +0 -0
index e67c40a48fb4..ce427128f034 100644

drivers/gpu/drm/udl/udl_modeset.c int udl_modeset_init(struct drm_device *dev) · line 482

Quoted 4 lines
drivers/gpu/drm/udl/udl_modeset.c +1 -0
@@ -479,6 +479,7 @@ int udl_modeset_init(struct drm_device *dev)
  					   format_count, NULL, connector);
  	if (ret)
  		return ret;
+	drm_plane_enable_fb_damage_clips(&udl->display_pipe.plane);

I'm assuming this passes with all the igts we have (I hope those finally landed) and a damage-capable compositor doesn't go boom either?

Quoted 4 lines

Either way patch lgtm. Reviewed-by: Daniel Vetter <[email protected]>

Also I wonder whether we should have a check in the damage helpers to make sure drivers don't forget to call this function to set up the uapi ...

It warns, but you can ignore that.

Best regards
Thomas

Quoted 10 lines

Cheers, Daniel

Quoted 6 lines
drivers/gpu/drm/udl/udl_modeset.c +0 -0
  	drm_mode_config_reset(dev);
 
Signature · 1 line
2.37.1
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
#3 lore raw
Quoted 25 lines · Thomas Zimmermann

Hi

Am 06.09.22 um 21:35 schrieb Daniel Vetter:

Quoted 22 lines · Thomas Zimmermann
Quoted 13 lines

Call drm_plane_enable_fb_damage_clips() and give userspace a chance of minimizing the updated display area.

---
  drivers/gpu/drm/udl/udl_modeset.c | 1 +
  1 file changed, 1 insertion(+)
drivers/gpu/drm/udl/udl_modeset.c +0 -0
index e67c40a48fb4..ce427128f034 100644

drivers/gpu/drm/udl/udl_modeset.c int udl_modeset_init(struct drm_device *dev) · line 482

Quoted 4 lines
drivers/gpu/drm/udl/udl_modeset.c +1 -0
@@ -479,6 +479,7 @@ int udl_modeset_init(struct drm_device *dev)
  					   format_count, NULL, connector);
  	if (ret)
  		return ret;
+	drm_plane_enable_fb_damage_clips(&udl->display_pipe.plane);

I'm assuming this passes with all the igts we have (I hope those finally landed) and a damage-capable compositor doesn't go boom either?

Quoted 6 lines
Quoted 4 lines

Either way patch lgtm. Reviewed-by: Daniel Vetter <[email protected]>

Also I wonder whether we should have a check in the damage helpers to make sure drivers don't forget to call this function to set up the uapi ...

It warns, but you can ignore that.

Yeah that's as good as it gets, we can't crash the driver :-) -Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch