Re: [PATCH 2/2] drm/fbdev: Move damage clip check to higher level

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2022-12-21 at 13:05 +0100, Thomas Zimmermann wrote:
> Hi
> 
> Am 21.12.22 um 12:19 schrieb Jouni Högander:
> > Checking if damage clip is valid is common to all fb helpers.
> > Makes more sense to check it in higher level than adding into
> > all helpers.
> 
> It was a deliberate decision to separate damage clipping and dirty 
> updates; done in [1]. Clipping is an optional hint in our regular
> damage 
> handling via drm_framebuffer_funcs.dirty. The fb_dirty callback now 
> follows that semantics.
> 
> I mentioned that it would be better to implement those fb_ops
> callbacks 
> for i915. But if you go with fb_dirty, please implement the clipping 
> test in your callback.

Thank you for your comments. I have sent a new version. Please check.

> 
> Best regards
> Thomas
> 
> [1]
> https://patchwork.freedesktop.org/patch/509958/?series=109943&rev=3
> 
> > 
> > Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
> > Cc: Thomas Zimmermann <tzimmermann@xxxxxxx>
> > Cc: Jani Nikula <jani.nikula@xxxxxxxxx>
> > Signed-off-by: Jouni Högander <jouni.hogander@xxxxxxxxx>
> > ---
> >   drivers/gpu/drm/drm_fb_helper.c     | 4 ++++
> >   drivers/gpu/drm/drm_fbdev_generic.c | 4 ----
> >   2 files changed, 4 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/drm_fb_helper.c
> > b/drivers/gpu/drm/drm_fb_helper.c
> > index b3a731b9170a..78c889dbc610 100644
> > --- a/drivers/gpu/drm/drm_fb_helper.c
> > +++ b/drivers/gpu/drm/drm_fb_helper.c
> > @@ -384,6 +384,10 @@ static void drm_fb_helper_fb_dirty(struct
> > drm_fb_helper *helper)
> >         clip->x2 = clip->y2 = 0;
> >         spin_unlock_irqrestore(&helper->damage_lock, flags);
> >   
> > +       /* Call damage handlers only if necessary */
> > +       if (!(clip_copy.x1 < clip_copy.x2 && clip_copy.y1 <
> > clip_copy.y2))
> > +               return;
> > +
> >         ret = helper->funcs->fb_dirty(helper, &clip_copy);
> >         if (ret)
> >                 goto err;
> > diff --git a/drivers/gpu/drm/drm_fbdev_generic.c
> > b/drivers/gpu/drm/drm_fbdev_generic.c
> > index 0a4c160e0e58..6c6bb0dd2ea8 100644
> > --- a/drivers/gpu/drm/drm_fbdev_generic.c
> > +++ b/drivers/gpu/drm/drm_fbdev_generic.c
> > @@ -334,10 +334,6 @@ static int drm_fbdev_fb_dirty(struct
> > drm_fb_helper *helper, struct drm_clip_rect
> >         if (!drm_fbdev_use_shadow_fb(helper))
> >                 return 0;
> >   
> > -       /* Call damage handlers only if necessary */
> > -       if (!(clip->x1 < clip->x2 && clip->y1 < clip->y2))
> > -               return 0;
> > -
> >         if (helper->buffer) {
> >                 ret = drm_fbdev_damage_blit(helper, clip);
> >                 if (drm_WARN_ONCE(dev, ret, "Damage blitter failed:
> > ret=%d\n", ret))
> 
> -- 
> 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





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux