diff options
Diffstat (limited to 'drivers/gpu/drm/msm/adreno/adreno_gpu.c')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/adreno_gpu.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.c b/drivers/gpu/drm/msm/adreno/adreno_gpu.c index 76c1df73e747..655ce5b14ad0 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c | |||
@@ -95,7 +95,7 @@ int adreno_hw_init(struct msm_gpu *gpu) | |||
95 | 95 | ||
96 | DBG("%s", gpu->name); | 96 | DBG("%s", gpu->name); |
97 | 97 | ||
98 | ret = msm_gem_get_iova_locked(gpu->rb->bo, gpu->id, &gpu->rb_iova); | 98 | ret = msm_gem_get_iova(gpu->rb->bo, gpu->id, &gpu->rb_iova); |
99 | if (ret) { | 99 | if (ret) { |
100 | gpu->rb_iova = 0; | 100 | gpu->rb_iova = 0; |
101 | dev_err(gpu->dev->dev, "could not map ringbuffer: %d\n", ret); | 101 | dev_err(gpu->dev->dev, "could not map ringbuffer: %d\n", ret); |
@@ -370,8 +370,10 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev, | |||
370 | return ret; | 370 | return ret; |
371 | } | 371 | } |
372 | 372 | ||
373 | mutex_lock(&drm->struct_mutex); | ||
373 | gpu->memptrs_bo = msm_gem_new(drm, sizeof(*gpu->memptrs), | 374 | gpu->memptrs_bo = msm_gem_new(drm, sizeof(*gpu->memptrs), |
374 | MSM_BO_UNCACHED); | 375 | MSM_BO_UNCACHED); |
376 | mutex_unlock(&drm->struct_mutex); | ||
375 | if (IS_ERR(gpu->memptrs_bo)) { | 377 | if (IS_ERR(gpu->memptrs_bo)) { |
376 | ret = PTR_ERR(gpu->memptrs_bo); | 378 | ret = PTR_ERR(gpu->memptrs_bo); |
377 | gpu->memptrs_bo = NULL; | 379 | gpu->memptrs_bo = NULL; |
@@ -379,13 +381,13 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev, | |||
379 | return ret; | 381 | return ret; |
380 | } | 382 | } |
381 | 383 | ||
382 | gpu->memptrs = msm_gem_vaddr_locked(gpu->memptrs_bo); | 384 | gpu->memptrs = msm_gem_vaddr(gpu->memptrs_bo); |
383 | if (!gpu->memptrs) { | 385 | if (!gpu->memptrs) { |
384 | dev_err(drm->dev, "could not vmap memptrs\n"); | 386 | dev_err(drm->dev, "could not vmap memptrs\n"); |
385 | return -ENOMEM; | 387 | return -ENOMEM; |
386 | } | 388 | } |
387 | 389 | ||
388 | ret = msm_gem_get_iova_locked(gpu->memptrs_bo, gpu->base.id, | 390 | ret = msm_gem_get_iova(gpu->memptrs_bo, gpu->base.id, |
389 | &gpu->memptrs_iova); | 391 | &gpu->memptrs_iova); |
390 | if (ret) { | 392 | if (ret) { |
391 | dev_err(drm->dev, "could not map memptrs: %d\n", ret); | 393 | dev_err(drm->dev, "could not map memptrs: %d\n", ret); |