From: Thomas Zimmermann Date: Tue, 15 Nov 2022 11:58:15 +0000 (+0100) Subject: drm/fb-helper: Move dirty-fb update into helper function X-Git-Tag: v6.6.17~3937^2~23^2~1303 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17d64f1570679400fa5d4b84ecda1a418a704304;p=platform%2Fkernel%2Flinux-rpi.git drm/fb-helper: Move dirty-fb update into helper function 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 Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20221115115819.23088-3-tzimmermann@suse.de --- diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 1786155..be8ecb5 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 @@ err: 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); +} + /** * drm_fb_helper_prepare - setup a drm_fb_helper structure * @dev: DRM device