drm/vc4: hvs: Remove planes currently allocated before taking down
authorMaxime Ripard <maxime@cerno.tech>
Mon, 9 May 2022 11:46:54 +0000 (13:46 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Wed, 7 Sep 2022 08:53:01 +0000 (10:53 +0200)
commitb5174bbd2a21572472c3269dfe2a16fb7c9565af
treeec9217f5c09b6149311246efe63d4e8af8483be0
parent6041c403011509b0d95b097cbbba39f04c61a5b2
drm/vc4: hvs: Remove planes currently allocated before taking down

When the HVS driver is unbound, a lot of memory allocations in the LBM and
DLIST RAM are still assigned to planes that are still allocated.

Thus, we hit a warning when calling drm_mm_takedown() since the memory pool
is not completely free of allocations.

Let's free all the currently live entries before calling drm_mm_takedown().

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_hvs.c