dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/udl: Enable damage clipping
@ 2022-07-28  7:47 Thomas Zimmermann
  2022-09-06 19:35 ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Zimmermann @ 2022-07-28  7:47 UTC (permalink / raw)
  To: airlied, sean, airlied, daniel; +Cc: Thomas Zimmermann, dri-devel

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

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/gpu/drm/udl/udl_modeset.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
index e67c40a48fb4..ce427128f034 100644
--- a/drivers/gpu/drm/udl/udl_modeset.c
+++ b/drivers/gpu/drm/udl/udl_modeset.c
@@ -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);
 
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/udl: Enable damage clipping
  2022-07-28  7:47 [PATCH] drm/udl: Enable damage clipping Thomas Zimmermann
@ 2022-09-06 19:35 ` Daniel Vetter
  2022-09-07  6:59   ` Thomas Zimmermann
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2022-09-06 19:35 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: airlied, airlied, sean, dri-devel

On Thu, Jul 28, 2022 at 09:47:56AM +0200, Thomas Zimmermann wrote:
> Call drm_plane_enable_fb_damage_clips() and give userspace a chance
> of minimizing the updated display area.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/gpu/drm/udl/udl_modeset.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
> index e67c40a48fb4..ce427128f034 100644
> --- a/drivers/gpu/drm/udl/udl_modeset.c
> +++ b/drivers/gpu/drm/udl/udl_modeset.c
> @@ -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 <daniel.vetter@ffwll.ch>

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

>  
>  	drm_mode_config_reset(dev);
>  
> -- 
> 2.37.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/udl: Enable damage clipping
  2022-09-06 19:35 ` Daniel Vetter
@ 2022-09-07  6:59   ` Thomas Zimmermann
  2022-09-07 16:38     ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Zimmermann @ 2022-09-07  6:59 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: airlied, airlied, sean, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1571 bytes --]

Hi

Am 06.09.22 um 21:35 schrieb Daniel Vetter:
> On Thu, Jul 28, 2022 at 09:47:56AM +0200, Thomas Zimmermann wrote:
>> Call drm_plane_enable_fb_damage_clips() and give userspace a chance
>> of minimizing the updated display area.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>>   drivers/gpu/drm/udl/udl_modeset.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
>> index e67c40a48fb4..ce427128f034 100644
>> --- a/drivers/gpu/drm/udl/udl_modeset.c
>> +++ b/drivers/gpu/drm/udl/udl_modeset.c
>> @@ -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 <daniel.vetter@ffwll.ch>
> 
> 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

> 
> Cheers, Daniel
> 
>>   
>>   	drm_mode_config_reset(dev);
>>   
>> -- 
>> 2.37.1
>>
> 

-- 
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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/udl: Enable damage clipping
  2022-09-07  6:59   ` Thomas Zimmermann
@ 2022-09-07 16:38     ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2022-09-07 16:38 UTC (permalink / raw)
  To: Thomas Zimmermann; +Cc: airlied, airlied, sean, dri-devel

On Wed, Sep 07, 2022 at 08:59:17AM +0200, Thomas Zimmermann wrote:
> Hi
> 
> Am 06.09.22 um 21:35 schrieb Daniel Vetter:
> > On Thu, Jul 28, 2022 at 09:47:56AM +0200, Thomas Zimmermann wrote:
> > > Call drm_plane_enable_fb_damage_clips() and give userspace a chance
> > > of minimizing the updated display area.
> > > 
> > > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> > > ---
> > >   drivers/gpu/drm/udl/udl_modeset.c | 1 +
> > >   1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
> > > index e67c40a48fb4..ce427128f034 100644
> > > --- a/drivers/gpu/drm/udl/udl_modeset.c
> > > +++ b/drivers/gpu/drm/udl/udl_modeset.c
> > > @@ -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 <daniel.vetter@ffwll.ch>
> > 
> > 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
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-07 16:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28  7:47 [PATCH] drm/udl: Enable damage clipping Thomas Zimmermann
2022-09-06 19:35 ` Daniel Vetter
2022-09-07  6:59   ` Thomas Zimmermann
2022-09-07 16:38     ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).