]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vc4: kms: Don't duplicate pending commit
authorMaxime Ripard <maxime@cerno.tech>
Wed, 17 Nov 2021 09:45:26 +0000 (10:45 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 29 Nov 2021 14:18:00 +0000 (15:18 +0100)
commit06a3cd43bd9b64670e9ecbbc097caf383fe03b12
treef9971f3e874dcf07c7ed8d2e77dd433395446548
parent94ee682ce7914a734b7e0f3e5da6d349d54df515
drm/vc4: kms: Don't duplicate pending commit

Our HVS global state, when duplicated, will also copy the pointer to the
drm_crtc_commit (and increase the reference count) for each FIFO if the
pointer is not NULL.

However, our atomic_setup function will overwrite that pointer without
putting the reference back leading to a memory leak.

Since the commit is only relevant during the atomic commit process, it
doesn't make sense to duplicate the reference to the commit anyway.
Let's remove it.

Fixes: 773085fb64df ("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-6-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_kms.c