drm/udl: Use damage iterator
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 6 Oct 2022 09:53:49 +0000 (11:53 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 7 Oct 2022 11:46:37 +0000 (13:46 +0200)
commitfcc21447c79816b40feddfc707006e9c72f3445e
tree380033fb69c33f37477da9f0ba7259854f3cdef8
parentca2bd373eb6632d5c37323755030fea6364937d0
drm/udl: Use damage iterator

Use a damage iterator to process damage areas individually. Merging
damage areas can result in large updates of unchanged framebuffer
regions. As USB is rather slow, it's better to process damage areas
individually and hence minimize USB-transfered data.

As part of the change, move drm_gem_fb_{begin,end}_cpu_access() into
the plane's atomic_update helper. To avoid overhead and intermediate
writers, we want to synchronize buffers and reserve access only once
before copying damage areas of the framebuffer.

v2:
* clarify commit message (Javier)

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