diff options
author | Rob Clark <robdclark@gmail.com> | 2017-06-13 16:15:36 +0300 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2017-06-16 18:16:01 +0300 |
commit | cb1e38181a0728777057fb03fc4cddb29b7fb24d (patch) | |
tree | 27fbe164012963de61373865d74a73a289663752 /drivers/gpu/drm/msm/adreno/adreno_gpu.c | |
parent | 42a105e9cfaf0a0c74fdac5ba4ff17d6c0b024cd (diff) | |
download | linux-cb1e38181a0728777057fb03fc4cddb29b7fb24d.tar.xz |
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>
Diffstat (limited to 'drivers/gpu/drm/msm/adreno/adreno_gpu.c')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index f8287fd727f1..30a2096ac9a2 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -64,7 +64,7 @@ int adreno_hw_init(struct msm_gpu *gpu) DBG("%s", gpu->name); - ret = msm_gem_get_iova(gpu->rb->bo, gpu->id, &gpu->rb_iova); + ret = msm_gem_get_iova_locked(gpu->rb->bo, gpu->id, &gpu->rb_iova); if (ret) { gpu->rb_iova = 0; dev_err(gpu->dev->dev, "could not map ringbuffer: %d\n", ret); |