Skip to content

Commit

Permalink
drm/fb-helper: Move dirty-fb update into helper function
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20221115115819.23088-3-tzimmermann@suse.de
  • Loading branch information
Thomas Zimmermann committed Nov 16, 2022
1 parent b1be5ba commit 17d64f1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}

/**
* drm_fb_helper_prepare - setup a drm_fb_helper structure
* @dev: DRM device
Expand Down

0 comments on commit 17d64f1

Please sign in to comment.