drm/msm/a6xx: Track and manage a6xx state memory
authorJordan Crouse <jcrouse@codeaurora.org>
Fri, 2 Nov 2018 15:25:26 +0000 (09:25 -0600)
committerRob Clark <robdclark@gmail.com>
Tue, 11 Dec 2018 18:05:30 +0000 (13:05 -0500)
commitd6852b4b2d0140b0fbfe112edf4fe66c1857b561
treeef8569126eedff5c7335a46f53129bd7db76c2bc
parent1707add815519da406c2d1444a1f10ef8bb4ad5b
drm/msm/a6xx: Track and manage a6xx state memory

The a6xx GPU state allocates a LOT of memory. Add a bit of
infrastructure to track the memory allocations in the GPU structure
and delete them when the state is destroyed much the same way
that devm works with the device model as a whole.  This protects
against the developer accidentally forgetting to add a kfree() to
an ever growing list.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c