Skip to content
Commit 470cf28a authored by Maxime Ripard's avatar Maxime Ripard Committed by Phil Elwell
Browse files

drm/vc4: bo: Fix drmm_mutex_init memory hog

Commit 374146ca ("drm/vc4: Switch to drmm_mutex_init") converted,
among other functions, vc4_create_object() to use drmm_mutex_init().

However, that function is used to allocate a BO, and therefore the
mutex needs to be freed much sooner than when the DRM device is removed
from the system.

For each buffer allocation we thus end up allocating a small structure
as part of the DRM-managed mechanism that is never freed, eventually
leading us to no longer having any free memory anymore.

Let's switch back to mutex_init/mutex_destroy to deal with it properly.

Fixes: 374146ca

 ("drm/vc4: Switch to drmm_mutex_init")
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
parent d1d8e54d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment