Re: [PATCH 2/5] drm/fb-helper: Move dirty-fb update into helper function

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

 



On Thu, Nov 10, 2022 at 02:55:16PM +0100, Thomas Zimmermann wrote:
> Move the dirty-fb update from the damage-worker callback into the
> new helper drm_fb_helper_fb_dirty(), so that it can run outside the
> damage worker. This change will help to remove the damage worker
> entirely. No functional changes.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@xxxxxxx>
> ---
>  drivers/gpu/drm/drm_fb_helper.c | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 178615565760e..be8ecb5e50b56 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -367,9 +367,8 @@ static void drm_fb_helper_resume_worker(struct work_struct *work)
>  	console_unlock();
>  }
>  
> -static void drm_fb_helper_damage_work(struct work_struct *work)
> +static void drm_fb_helper_fb_dirty(struct drm_fb_helper *helper)
>  {
> -	struct drm_fb_helper *helper = container_of(work, struct drm_fb_helper, damage_work);
>  	struct drm_device *dev = helper->dev;
>  	struct drm_clip_rect *clip = &helper->damage_clip;
>  	struct drm_clip_rect clip_copy;
> @@ -404,6 +403,13 @@ static void drm_fb_helper_damage_work(struct work_struct *work)
>  	spin_unlock_irqrestore(&helper->damage_lock, flags);
>  }
>  
> +static void drm_fb_helper_damage_work(struct work_struct *work)
> +{
> +	struct drm_fb_helper *helper = container_of(work, struct drm_fb_helper, damage_work);
> +
> +	drm_fb_helper_fb_dirty(helper);

Was pondering a bit the naming, but it fits the ->fb_dirty callback, so
at least consistent with what we have. Sometimes I'm forgetting how many
layers of indirection we have just for historical reasons :-/

Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

> +}
> +
>  /**
>   * drm_fb_helper_prepare - setup a drm_fb_helper structure
>   * @dev: DRM device
> -- 
> 2.38.0
> 

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



[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