]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/a6xx: Remove devm calls from gmu driver
authorSean Paul <seanpaul@chromium.org>
Thu, 23 May 2019 17:16:43 +0000 (13:16 -0400)
committerSean Paul <seanpaul@chromium.org>
Fri, 24 May 2019 13:53:36 +0000 (09:53 -0400)
commit31799b54d978681487d027448f77655a65e36c17
tree2513254a4aabca5307738c3ecb50e6997bf833c5
parenta5e0ba3432b1e21bda88503245e25ae4eb91fb80
drm/msm/a6xx: Remove devm calls from gmu driver

The gmu driver is initialized and cleaned up with calls from the gpu driver. As
such, the platform device stays valid after a6xx_gmu_remove is called and the
device managed resources are not freed. In the case of gpu probe failures or
unbind, these resources will remain managed.

If the gpu bind is run again (eg: if there's a probe defer somewhere in msm),
these resources will be initialized again for the same device, creating multiple
references. In the case of irqs, this causes failures since the irqs are
not shared (nor should they be).

This patch removes all devm_* calls and manually cleans things up in
gmu_remove.

Changes in v2:
- Add iounmap and free_irq to gmu_probe error paths

Cc: Jordan Crouse <jcrouse@codeaurora.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190523171653.138678-4-sean@poorly.run
drivers/gpu/drm/msm/adreno/a6xx_gmu.c