drm/vc4: bo: Add a managed action to cleanup the cache
authorMaxime Ripard <maxime@cerno.tech>
Thu, 29 Oct 2020 19:00:59 +0000 (20:00 +0100)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 2 Nov 2020 11:11:24 +0000 (12:11 +0100)
commit1c80be48c70a2198f7cf04a546b3805b92293ac6
treef461d1be64e4b53aaef85d85e2a08788ec9aba92
parent3cea11cd5e3b00d91caf0b4730194039b45c5891
drm/vc4: bo: Add a managed action to cleanup the cache

The BO cache needs to be cleaned up using vc4_bo_cache_destroy, but it's
not used consistently (vc4_drv's bind calls it in its error path, but
doesn't in unbind), and we can make that automatic through a managed
action. Let's remove the requirement to call vc4_bo_cache_destroy.

Fixes: c826a6e10644 ("drm/vc4: Add a BO cache.")
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20201029190104.2181730-1-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_bo.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h