Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20221115115819.23088-2-tzimmermann@suse.de

+8 -2
+8 -2
drivers/gpu/drm/drm_fb_helper.c
··· 576 576 } 577 577 EXPORT_SYMBOL(drm_fb_helper_fini); 578 578 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) 581 581 { 582 582 struct drm_clip_rect *clip = &helper->damage_clip; 583 583 unsigned long flags; ··· 588 588 clip->x2 = max_t(u32, clip->x2, x + width); 589 589 clip->y2 = max_t(u32, clip->y2, y + height); 590 590 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); 591 597 592 598 schedule_work(&helper->damage_work); 593 599 }