Commit 84c61275 authored by Jordan Crouse's avatar Jordan Crouse Committed by Rob Clark

drm/msm/gpu: Map the ringbuffer in the iova at create time

For reasons that I'm sure made perfect sense at the time we were
opting to defer the iova alloc / pin on the ringbuffer until HW
init time so when we moved to iova reference counting we ended
up adding a reference count every time the hardware started.
Not that it mattered (because the ring is always around) but
it did make the debug output look odd. Allocate and pin the iova
at create time instead.
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent 0815d774
...@@ -209,15 +209,6 @@ int adreno_hw_init(struct msm_gpu *gpu) ...@@ -209,15 +209,6 @@ int adreno_hw_init(struct msm_gpu *gpu)
if (!ring) if (!ring)
continue; continue;
ret = msm_gem_get_and_pin_iova(ring->bo, gpu->aspace,
&ring->iova);
if (ret) {
ring->iova = 0;
DRM_DEV_ERROR(gpu->dev->dev,
"could not map ringbuffer %d: %d\n", i, ret);
return ret;
}
ring->cur = ring->start; ring->cur = ring->start;
ring->next = ring->start; ring->next = ring->start;
......
...@@ -36,9 +36,9 @@ struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int id, ...@@ -36,9 +36,9 @@ struct msm_ringbuffer *msm_ringbuffer_new(struct msm_gpu *gpu, int id,
ring->gpu = gpu; ring->gpu = gpu;
ring->id = id; ring->id = id;
/* Pass NULL for the iova pointer - we will map it later */
ring->start = msm_gem_kernel_new(gpu->dev, MSM_GPU_RINGBUFFER_SZ, ring->start = msm_gem_kernel_new(gpu->dev, MSM_GPU_RINGBUFFER_SZ,
MSM_BO_WC, gpu->aspace, &ring->bo, NULL); MSM_BO_WC, gpu->aspace, &ring->bo, &ring->iova);
if (IS_ERR(ring->start)) { if (IS_ERR(ring->start)) {
ret = PTR_ERR(ring->start); ret = PTR_ERR(ring->start);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment