drm/fb-helper: Clip damage area to written memory range
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 9 Feb 2022 16:16:16 +0000 (17:16 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Thu, 10 Feb 2022 13:49:21 +0000 (14:49 +0100)
commitfe23b56f56532dcc5e49e83e20333b97919dec53
treeafc9c439ce658a1b71f3e3d8b8fb5d9585fbcc8f
parent67b723f5b74254d27962b1b59bddfee1584575ff
drm/fb-helper: Clip damage area to written memory range

Write helpers used to mark the complete screen as dirty. This is
wasteful for writes that only change a small portion of the screen.
Fix the problem by computing the damaged area from the written
memory range and perform damage handling accordingly.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220209161617.3553-5-tzimmermann@suse.de
drivers/gpu/drm/drm_fb_helper.c