]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:03 +0000 (19:22 +0100)
commite12c16808ed8e53a021adea6dd3b628efd7e34ec
tree5d5d9ecd3d39b8ea3f35f200411b447ef5f24152
parentb4ca8e9563c7d12efd8072f391901735bbdf7f79
drm/vc4: bo: Add a managed action to cleanup the cache

[ Upstream commit 1c80be48c70a2198f7cf04a546b3805b92293ac6 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/vc4/vc4_bo.c
drivers/gpu/drm/vc4/vc4_drv.c
drivers/gpu/drm/vc4/vc4_drv.h