Skip to content

Commit b1be5ba

Browse files
author
Thomas Zimmermann
committed
drm/fb-helper: Set damage-clip area in helper
Set the damage area in the new helper drm_fb_helper_add_damage_clip(). It can now be updated without scheduling the damage worker. This change will help to remove the damage worker entirely. No functional changes. Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent b230555 commit b1be5ba

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/gpu/drm/drm_fb_helper.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,8 +576,8 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
576576
}
577577
EXPORT_SYMBOL(drm_fb_helper_fini);
578578

579-
static void drm_fb_helper_damage(struct drm_fb_helper *helper, u32 x, u32 y,
580-
u32 width, u32 height)
579+
static void drm_fb_helper_add_damage_clip(struct drm_fb_helper *helper, u32 x, u32 y,
580+
u32 width, u32 height)
581581
{
582582
struct drm_clip_rect *clip = &helper->damage_clip;
583583
unsigned long flags;
@@ -588,6 +588,12 @@ static void drm_fb_helper_damage(struct drm_fb_helper *helper, u32 x, u32 y,
588588
clip->x2 = max_t(u32, clip->x2, x + width);
589589
clip->y2 = max_t(u32, clip->y2, y + height);
590590
spin_unlock_irqrestore(&helper->damage_lock, flags);
591+
}
592+
593+
static void drm_fb_helper_damage(struct drm_fb_helper *helper, u32 x, u32 y,
594+
u32 width, u32 height)
595+
{
596+
drm_fb_helper_add_damage_clip(helper, x, y, width, height);
591597

592598
schedule_work(&helper->damage_work);
593599
}

0 commit comments

Comments
 (0)