]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vc4: kms: Add missing drm_crtc_commit_put
authorMaxime Ripard <maxime@cerno.tech>
Wed, 17 Nov 2021 09:45:24 +0000 (10:45 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 29 Nov 2021 14:17:54 +0000 (15:17 +0100)
commit78c63b51888365eaddafa5a6424bb99ac0086e35
treec144cfce15e438a5e6015e7ac1d8cb9085ad8398
parent00d921d2bbd1a8090cd9e83fddb818c531fc2177
drm/vc4: kms: Add missing drm_crtc_commit_put

Commit 4c39a07c7800 ("drm/vc4: kms: Wait on previous FIFO users before a
commit") introduced a global state for the HVS, with each FIFO storing
the current CRTC commit so that we can properly synchronize commits.

However, the refcounting was off and we thus ended up leaking the
drm_crtc_commit structure every commit. Add a drm_crtc_commit_put to
prevent the leakage.

Fixes: 4c39a07c7800 ("drm/vc4: kms: Wait on previous FIFO users before a commit")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Tested-by: Jian-Hong Pan <jhp@endlessos.org>
Link: https://lore.kernel.org/r/20211117094527.146275-4-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_kms.c