]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: fix locking inconsistency for gpu->hw_init()
authorRob Clark <robdclark@gmail.com>
Tue, 13 Jun 2017 13:15:36 +0000 (09:15 -0400)
committerRob Clark <robdclark@gmail.com>
Fri, 16 Jun 2017 15:16:01 +0000 (11:16 -0400)
commitcb1e38181a0728777057fb03fc4cddb29b7fb24d
tree27fbe164012963de61373865d74a73a289663752
parent42a105e9cfaf0a0c74fdac5ba4ff17d6c0b024cd
drm/msm: fix locking inconsistency for gpu->hw_init()

Most, but not all, paths where calling the with struct_mutex held.  The
fast-path in msm_gem_get_iova() (plus some sub-code-paths that only run
the first time) was masking this issue.

So lets just always hold struct_mutex for hw_init().  And sprinkle some
WARN_ON()'s and might_lock() to avoid this sort of problem in the
future.

Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/adreno/a5xx_gpu.c
drivers/gpu/drm/msm/adreno/a5xx_power.c
drivers/gpu/drm/msm/adreno/adreno_device.c
drivers/gpu/drm/msm/adreno/adreno_gpu.c
drivers/gpu/drm/msm/msm_gem.c
drivers/gpu/drm/msm/msm_gpu.c