]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerPaolo Pisati <paolo.pisati@canonical.com>
Thu, 9 Dec 2021 10:10:43 +0000 (11:10 +0100)
commitdefed5ce65755696c552c2ab72c900a5ec41f06d
treef02844578a1362ad5ea16e9e22b65ec278010a5d
parent7e0688fa4bef7430dd35eda1095d79d0e467d9ec
drm/vc4: kms: Add missing drm_crtc_commit_put

BugLink: https://bugs.launchpad.net/bugs/1953731
commit 049cfff8d53a30cae3349ff71a4c01b7d9981bc2 upstream.

Commit 9ec03d7f1ed3 ("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: 9ec03d7f1ed3 ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/gpu/drm/vc4/vc4_kms.c