]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/msm: Refcount framebuffer pins
authorRob Clark <robin.clark@oss.qualcomm.com>
Sun, 29 Jun 2025 20:12:55 +0000 (13:12 -0700)
committerRob Clark <robin.clark@oss.qualcomm.com>
Fri, 4 Jul 2025 18:09:45 +0000 (11:09 -0700)
commit8ac37c88f991257215400ad30ee9087dbc7c0a1b
treef6393ae0b57c95375fa88f4a0d561a309bfc468b
parent4d0f62e4fe1072bc49eaf2677e2fb877e4e68f64
drm/msm: Refcount framebuffer pins

We were already keeping a refcount of # of prepares (pins), to clear the
iova array.  Use that to avoid unpinning the iova until the last cleanup
(unpin).  This way, when msm_gem_unpin_iova() actually tears down the
mapping, we won't have problems if the fb is being scanned out on
another display (for example).

Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Tested-by: Antonino Maniscalco <antomani103@gmail.com>
Reviewed-by: Antonino Maniscalco <antomani103@gmail.com>
Patchwork: https://patchwork.freedesktop.org/patch/661477/
drivers/gpu/drm/msm/msm_fb.c