From: Daniel Vetter <daniel@ffwll.ch>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: javierm@redhat.com, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 2/5] drm/fb-helper: Move dirty-fb update into helper function
Date: Fri, 11 Nov 2022 10:18:18 +0100 [thread overview]
Message-ID: <Y24TWkyXvMRmHyDZ@phenom.ffwll.local> (raw)
In-Reply-To: <20221110135519.30029-3-tzimmermann@suse.de>
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@suse.de>
> ---
> 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@ffwll.ch>
> +}
> +
> /**
> * 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
next prev parent reply other threads:[~2022-11-11 9:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 13:55 [PATCH 0/5] drm/fb-helper: Remove damage worker Thomas Zimmermann
2022-11-10 13:55 ` [PATCH 1/5] drm/fb-helper: Set damage-clip area in helper Thomas Zimmermann
2022-11-11 9:15 ` Daniel Vetter
2022-11-10 13:55 ` [PATCH 2/5] drm/fb-helper: Move dirty-fb update into helper function Thomas Zimmermann
2022-11-11 9:18 ` Daniel Vetter [this message]
2022-11-10 13:55 ` [PATCH 3/5] drm/fb-helper: Perform damage handling in deferred-I/O helper Thomas Zimmermann
2022-11-11 9:23 ` Daniel Vetter
2022-11-10 13:55 ` [PATCH 4/5] drm/fb-helper: Schedule deferred-I/O worker after writing to framebuffer Thomas Zimmermann
2022-11-10 14:28 ` Daniel Vetter
2022-11-11 9:28 ` Daniel Vetter
2022-11-15 10:05 ` Thomas Zimmermann
2022-11-16 9:21 ` Daniel Vetter
2022-11-10 13:55 ` [PATCH 5/5] drm/fb-helper: Remove damage worker Thomas Zimmermann
2022-11-11 9:42 ` Daniel Vetter
2022-11-15 11:30 ` Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y24TWkyXvMRmHyDZ@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.