diff options
author | Sushmita Susheelendra <ssusheel@codeaurora.org> | 2017-06-13 16:52:54 -0600 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2017-06-17 08:03:07 -0400 |
commit | 0e08270a1f01bceae17d32a0d75aad2388bd1ba2 (patch) | |
tree | 31f17b04f1a459ca5ab26772626c8ece4c54158a /drivers/gpu/drm/msm/adreno/a5xx_power.c | |
parent | 816fa34c051492c7f115ad2fd91c9e723d7fc298 (diff) |
drm/msm: Separate locking of buffer resources from struct_mutex
Buffer object specific resources like pages, domains, sg list
need not be protected with struct_mutex. They can be protected
with a buffer object level lock. This simplifies locking and
makes it easier to avoid potential recursive locking scenarios
for SVM involving mmap_sem and struct_mutex. This also removes
unnecessary serialization when creating buffer objects, and also
between buffer object creation and GPU command submission.
Signed-off-by: Sushmita Susheelendra <ssusheel@codeaurora.org>
[robclark: squash in handling new locking for shrinker]
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/adreno/a5xx_power.c')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/a5xx_power.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_power.c b/drivers/gpu/drm/msm/adreno/a5xx_power.c index feb7f4fd42fb..87af6eea0483 100644 --- a/drivers/gpu/drm/msm/adreno/a5xx_power.c +++ b/drivers/gpu/drm/msm/adreno/a5xx_power.c @@ -294,15 +294,15 @@ void a5xx_gpmu_ucode_init(struct msm_gpu *gpu) */ bosize = (cmds_size + (cmds_size / TYPE4_MAX_PAYLOAD) + 1) << 2; - a5xx_gpu->gpmu_bo = msm_gem_new(drm, bosize, MSM_BO_UNCACHED); + a5xx_gpu->gpmu_bo = msm_gem_new_locked(drm, bosize, MSM_BO_UNCACHED); if (IS_ERR(a5xx_gpu->gpmu_bo)) goto err; - if (msm_gem_get_iova_locked(a5xx_gpu->gpmu_bo, gpu->aspace, + if (msm_gem_get_iova(a5xx_gpu->gpmu_bo, gpu->aspace, &a5xx_gpu->gpmu_iova)) goto err; - ptr = msm_gem_get_vaddr_locked(a5xx_gpu->gpmu_bo); + ptr = msm_gem_get_vaddr(a5xx_gpu->gpmu_bo); if (!ptr) goto err; @@ -321,7 +321,7 @@ void a5xx_gpmu_ucode_init(struct msm_gpu *gpu) cmds_size -= _size; } - msm_gem_put_vaddr_locked(a5xx_gpu->gpmu_bo); + msm_gem_put_vaddr(a5xx_gpu->gpmu_bo); a5xx_gpu->gpmu_dwords = dwords; goto out; |