summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
diff options
context:
space:
mode:
authorSushmita Susheelendra <ssusheel@codeaurora.org>2017-06-13 16:52:54 -0600
committerRob Clark <robdclark@gmail.com>2017-06-17 08:03:07 -0400
commit0e08270a1f01bceae17d32a0d75aad2388bd1ba2 (patch)
tree31f17b04f1a459ca5ab26772626c8ece4c54158a /drivers/gpu/drm/msm/adreno/a5xx_gpu.c
parent816fa34c051492c7f115ad2fd91c9e723d7fc298 (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_gpu.c')
-rw-r--r--drivers/gpu/drm/msm/adreno/a5xx_gpu.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
index f6a9eec71fec..b4b54f1c24bc 100644
--- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
+++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c
@@ -297,18 +297,18 @@ static struct drm_gem_object *a5xx_ucode_load_bo(struct msm_gpu *gpu,
struct drm_gem_object *bo;
void *ptr;
- bo = msm_gem_new(drm, fw->size - 4, MSM_BO_UNCACHED);
+ bo = msm_gem_new_locked(drm, fw->size - 4, MSM_BO_UNCACHED);
if (IS_ERR(bo))
return bo;
- ptr = msm_gem_get_vaddr_locked(bo);
+ ptr = msm_gem_get_vaddr(bo);
if (!ptr) {
drm_gem_object_unreference(bo);
return ERR_PTR(-ENOMEM);
}
if (iova) {
- int ret = msm_gem_get_iova_locked(bo, gpu->aspace, iova);
+ int ret = msm_gem_get_iova(bo, gpu->aspace, iova);
if (ret) {
drm_gem_object_unreference(bo);
@@ -318,7 +318,7 @@ static struct drm_gem_object *a5xx_ucode_load_bo(struct msm_gpu *gpu,
memcpy(ptr, &fw->data[4], fw->size - 4);
- msm_gem_put_vaddr_locked(bo);
+ msm_gem_put_vaddr(bo);
return bo;
}