]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/appletbdrm: Allocate request/response buffers in begin_fb_access
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 10 Jun 2026 15:18:21 +0000 (17:18 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Fri, 17 Jul 2026 15:15:49 +0000 (17:15 +0200)
commit40a22ad1b5cb86a27f54d7837be20113d0eb49d2
treeb0fa7ade0ab09d3a9b5804669b184a52b7df4738
parentfaebb7ba1ac65fa5810b640df02ce04e509fdc11
drm/appletbdrm: Allocate request/response buffers in begin_fb_access

In atomic_check, damage handling is not fully evaluated. Another
atomic_check helper could trigger a full modeset and thus invalidate
damage clips.

Allocation of the request/response buffers in appletbdrm depends on
correct damage information. Otherwise it might allocate incorrectly
sized buffers. Allocate the buffers in the driver's begin_fb_access
helper. It runs early during the commit when damage clipping has been
fully evaluated.

v5:
- pass plane state as the old damage-iterator state
v2:
- allocate before drm_gem_begin_shadow_fb_access() to avoid leak on error

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Acked-by: Aditya Garg <gargaditya08@proton.me>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://patch.msgid.link/20260610152505.260172-6-tzimmermann@suse.de
drivers/gpu/drm/tiny/appletbdrm.c