aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2017-12-14 16:03:43 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-12-18 10:59:07 -0500
commit131b4b3686b701079e8fb82eb9384c8acdd3fc72 (patch)
treea85a6eeb96609d29f86a16c749282ec59b735661 /drivers
parent75758255dc0fae76a845fd5185cfcdf60990cc99 (diff)
drm/amdgpu: rename amdgpu_wb_* functions
add device for consistency. Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c8
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c10
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c16
-rw-r--r--drivers/gpu/drm/amd/amdgpu/cik_sdma.c10
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c10
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c10
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c10
-rw-r--r--drivers/gpu/drm/amd/amdgpu/si_dma.c10
10 files changed, 46 insertions, 46 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index c15b9441190f..81c1ddb9eb3a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1171,8 +1171,8 @@ struct amdgpu_wb {
1171 unsigned long used[DIV_ROUND_UP(AMDGPU_MAX_WB, BITS_PER_LONG)]; 1171 unsigned long used[DIV_ROUND_UP(AMDGPU_MAX_WB, BITS_PER_LONG)];
1172}; 1172};
1173 1173
1174int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb); 1174int amdgpu_device_wb_get(struct amdgpu_device *adev, u32 *wb);
1175void amdgpu_wb_free(struct amdgpu_device *adev, u32 wb); 1175void amdgpu_device_wb_free(struct amdgpu_device *adev, u32 wb);
1176 1176
1177void amdgpu_get_pcie_info(struct amdgpu_device *adev); 1177void amdgpu_get_pcie_info(struct amdgpu_device *adev);
1178 1178
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ec078a9a5de8..7b44ca29a2c8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -530,7 +530,7 @@ static int amdgpu_device_wb_init(struct amdgpu_device *adev)
530} 530}
531 531
532/** 532/**
533 * amdgpu_wb_get - Allocate a wb entry 533 * amdgpu_device_wb_get - Allocate a wb entry
534 * 534 *
535 * @adev: amdgpu_device pointer 535 * @adev: amdgpu_device pointer
536 * @wb: wb index 536 * @wb: wb index
@@ -538,7 +538,7 @@ static int amdgpu_device_wb_init(struct amdgpu_device *adev)
538 * Allocate a wb slot for use by the driver (all asics). 538 * Allocate a wb slot for use by the driver (all asics).
539 * Returns 0 on success or -EINVAL on failure. 539 * Returns 0 on success or -EINVAL on failure.
540 */ 540 */
541int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb) 541int amdgpu_device_wb_get(struct amdgpu_device *adev, u32 *wb)
542{ 542{
543 unsigned long offset = find_first_zero_bit(adev->wb.used, adev->wb.num_wb); 543 unsigned long offset = find_first_zero_bit(adev->wb.used, adev->wb.num_wb);
544 544
@@ -552,14 +552,14 @@ int amdgpu_wb_get(struct amdgpu_device *adev, u32 *wb)
552} 552}
553 553
554/** 554/**
555 * amdgpu_wb_free - Free a wb entry 555 * amdgpu_device_wb_free - Free a wb entry
556 * 556 *
557 * @adev: amdgpu_device pointer 557 * @adev: amdgpu_device pointer
558 * @wb: wb index 558 * @wb: wb index
559 * 559 *
560 * Free a wb slot allocated for use by the driver (all asics) 560 * Free a wb slot allocated for use by the driver (all asics)
561 */ 561 */
562void amdgpu_wb_free(struct amdgpu_device *adev, u32 wb) 562void amdgpu_device_wb_free(struct amdgpu_device *adev, u32 wb)
563{ 563{
564 if (wb < adev->wb.num_wb) 564 if (wb < adev->wb.num_wb)
565 __clear_bit(wb >> 3, adev->wb.used); 565 __clear_bit(wb >> 3, adev->wb.used);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index ef043361009f..bb40d2529a30 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -203,7 +203,7 @@ int amdgpu_gfx_kiq_init_ring(struct amdgpu_device *adev,
203 203
204 spin_lock_init(&kiq->ring_lock); 204 spin_lock_init(&kiq->ring_lock);
205 205
206 r = amdgpu_wb_get(adev, &adev->virt.reg_val_offs); 206 r = amdgpu_device_wb_get(adev, &adev->virt.reg_val_offs);
207 if (r) 207 if (r)
208 return r; 208 return r;
209 209
@@ -229,7 +229,7 @@ int amdgpu_gfx_kiq_init_ring(struct amdgpu_device *adev,
229void amdgpu_gfx_kiq_free_ring(struct amdgpu_ring *ring, 229void amdgpu_gfx_kiq_free_ring(struct amdgpu_ring *ring,
230 struct amdgpu_irq_src *irq) 230 struct amdgpu_irq_src *irq)
231{ 231{
232 amdgpu_wb_free(ring->adev, ring->adev->virt.reg_val_offs); 232 amdgpu_device_wb_free(ring->adev, ring->adev->virt.reg_val_offs);
233 amdgpu_ring_fini(ring); 233 amdgpu_ring_fini(ring);
234} 234}
235 235
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c
index f5f27e4f0f7f..06373d44b3da 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c
@@ -92,15 +92,15 @@ int amdgpu_ih_ring_init(struct amdgpu_device *adev, unsigned ring_size,
92 } 92 }
93 return 0; 93 return 0;
94 } else { 94 } else {
95 r = amdgpu_wb_get(adev, &adev->irq.ih.wptr_offs); 95 r = amdgpu_device_wb_get(adev, &adev->irq.ih.wptr_offs);
96 if (r) { 96 if (r) {
97 dev_err(adev->dev, "(%d) ih wptr_offs wb alloc failed\n", r); 97 dev_err(adev->dev, "(%d) ih wptr_offs wb alloc failed\n", r);
98 return r; 98 return r;
99 } 99 }
100 100
101 r = amdgpu_wb_get(adev, &adev->irq.ih.rptr_offs); 101 r = amdgpu_device_wb_get(adev, &adev->irq.ih.rptr_offs);
102 if (r) { 102 if (r) {
103 amdgpu_wb_free(adev, adev->irq.ih.wptr_offs); 103 amdgpu_device_wb_free(adev, adev->irq.ih.wptr_offs);
104 dev_err(adev->dev, "(%d) ih rptr_offs wb alloc failed\n", r); 104 dev_err(adev->dev, "(%d) ih rptr_offs wb alloc failed\n", r);
105 return r; 105 return r;
106 } 106 }
@@ -133,8 +133,8 @@ void amdgpu_ih_ring_fini(struct amdgpu_device *adev)
133 amdgpu_bo_free_kernel(&adev->irq.ih.ring_obj, 133 amdgpu_bo_free_kernel(&adev->irq.ih.ring_obj,
134 &adev->irq.ih.gpu_addr, 134 &adev->irq.ih.gpu_addr,
135 (void **)&adev->irq.ih.ring); 135 (void **)&adev->irq.ih.ring);
136 amdgpu_wb_free(adev, adev->irq.ih.wptr_offs); 136 amdgpu_device_wb_free(adev, adev->irq.ih.wptr_offs);
137 amdgpu_wb_free(adev, adev->irq.ih.rptr_offs); 137 amdgpu_device_wb_free(adev, adev->irq.ih.rptr_offs);
138 } 138 }
139} 139}
140 140
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index 41c75f9632dc..13044e66dcaf 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
@@ -263,25 +263,25 @@ int amdgpu_ring_init(struct amdgpu_device *adev, struct amdgpu_ring *ring,
263 return r; 263 return r;
264 } 264 }
265 265
266 r = amdgpu_wb_get(adev, &ring->rptr_offs); 266 r = amdgpu_device_wb_get(adev, &ring->rptr_offs);
267 if (r) { 267 if (r) {
268 dev_err(adev->dev, "(%d) ring rptr_offs wb alloc failed\n", r); 268 dev_err(adev->dev, "(%d) ring rptr_offs wb alloc failed\n", r);
269 return r; 269 return r;
270 } 270 }
271 271
272 r = amdgpu_wb_get(adev, &ring->wptr_offs); 272 r = amdgpu_device_wb_get(adev, &ring->wptr_offs);
273 if (r) { 273 if (r) {
274 dev_err(adev->dev, "(%d) ring wptr_offs wb alloc failed\n", r); 274 dev_err(adev->dev, "(%d) ring wptr_offs wb alloc failed\n", r);
275 return r; 275 return r;
276 } 276 }
277 277
278 r = amdgpu_wb_get(adev, &ring->fence_offs); 278 r = amdgpu_device_wb_get(adev, &ring->fence_offs);
279 if (r) { 279 if (r) {
280 dev_err(adev->dev, "(%d) ring fence_offs wb alloc failed\n", r); 280 dev_err(adev->dev, "(%d) ring fence_offs wb alloc failed\n", r);
281 return r; 281 return r;
282 } 282 }
283 283
284 r = amdgpu_wb_get(adev, &ring->cond_exe_offs); 284 r = amdgpu_device_wb_get(adev, &ring->cond_exe_offs);
285 if (r) { 285 if (r) {
286 dev_err(adev->dev, "(%d) ring cond_exec_polling wb alloc failed\n", r); 286 dev_err(adev->dev, "(%d) ring cond_exec_polling wb alloc failed\n", r);
287 return r; 287 return r;
@@ -348,11 +348,11 @@ void amdgpu_ring_fini(struct amdgpu_ring *ring)
348 if (!(ring->adev) || !(ring->adev->rings[ring->idx])) 348 if (!(ring->adev) || !(ring->adev->rings[ring->idx]))
349 return; 349 return;
350 350
351 amdgpu_wb_free(ring->adev, ring->rptr_offs); 351 amdgpu_device_wb_free(ring->adev, ring->rptr_offs);
352 amdgpu_wb_free(ring->adev, ring->wptr_offs); 352 amdgpu_device_wb_free(ring->adev, ring->wptr_offs);
353 353
354 amdgpu_wb_free(ring->adev, ring->cond_exe_offs); 354 amdgpu_device_wb_free(ring->adev, ring->cond_exe_offs);
355 amdgpu_wb_free(ring->adev, ring->fence_offs); 355 amdgpu_device_wb_free(ring->adev, ring->fence_offs);
356 356
357 amdgpu_bo_free_kernel(&ring->ring_obj, 357 amdgpu_bo_free_kernel(&ring->ring_obj,
358 &ring->gpu_addr, 358 &ring->gpu_addr,
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
index ed26dcbc4f79..e406c93d01d6 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c
@@ -626,7 +626,7 @@ static int cik_sdma_ring_test_ring(struct amdgpu_ring *ring)
626 u32 tmp; 626 u32 tmp;
627 u64 gpu_addr; 627 u64 gpu_addr;
628 628
629 r = amdgpu_wb_get(adev, &index); 629 r = amdgpu_device_wb_get(adev, &index);
630 if (r) { 630 if (r) {
631 dev_err(adev->dev, "(%d) failed to allocate wb slot\n", r); 631 dev_err(adev->dev, "(%d) failed to allocate wb slot\n", r);
632 return r; 632 return r;
@@ -639,7 +639,7 @@ static int cik_sdma_ring_test_ring(struct amdgpu_ring *ring)
639 r = amdgpu_ring_alloc(ring, 5); 639 r = amdgpu_ring_alloc(ring, 5);
640 if (r) { 640 if (r) {
641 DRM_ERROR("amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, r); 641 DRM_ERROR("amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, r);
642 amdgpu_wb_free(adev, index); 642 amdgpu_device_wb_free(adev, index);
643 return r; 643 return r;
644 } 644 }
645 amdgpu_ring_write(ring, SDMA_PACKET(SDMA_OPCODE_WRITE, SDMA_WRITE_SUB_OPCODE_LINEAR, 0)); 645 amdgpu_ring_write(ring, SDMA_PACKET(SDMA_OPCODE_WRITE, SDMA_WRITE_SUB_OPCODE_LINEAR, 0));
@@ -663,7 +663,7 @@ static int cik_sdma_ring_test_ring(struct amdgpu_ring *ring)
663 ring->idx, tmp); 663 ring->idx, tmp);
664 r = -EINVAL; 664 r = -EINVAL;
665 } 665 }
666 amdgpu_wb_free(adev, index); 666 amdgpu_device_wb_free(adev, index);
667 667
668 return r; 668 return r;
669} 669}
@@ -686,7 +686,7 @@ static int cik_sdma_ring_test_ib(struct amdgpu_ring *ring, long timeout)
686 u64 gpu_addr; 686 u64 gpu_addr;
687 long r; 687 long r;
688 688
689 r = amdgpu_wb_get(adev, &index); 689 r = amdgpu_device_wb_get(adev, &index);
690 if (r) { 690 if (r) {
691 dev_err(adev->dev, "(%ld) failed to allocate wb slot\n", r); 691 dev_err(adev->dev, "(%ld) failed to allocate wb slot\n", r);
692 return r; 692 return r;
@@ -735,7 +735,7 @@ err1:
735 amdgpu_ib_free(adev, &ib, NULL); 735 amdgpu_ib_free(adev, &ib, NULL);
736 dma_fence_put(f); 736 dma_fence_put(f);
737err0: 737err0:
738 amdgpu_wb_free(adev, index); 738 amdgpu_device_wb_free(adev, index);
739 return r; 739 return r;
740} 740}
741 741
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
index 121e628e7cdb..0c5b91a40f22 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
@@ -600,7 +600,7 @@ static int sdma_v2_4_ring_test_ring(struct amdgpu_ring *ring)
600 u32 tmp; 600 u32 tmp;
601 u64 gpu_addr; 601 u64 gpu_addr;
602 602
603 r = amdgpu_wb_get(adev, &index); 603 r = amdgpu_device_wb_get(adev, &index);
604 if (r) { 604 if (r) {
605 dev_err(adev->dev, "(%d) failed to allocate wb slot\n", r); 605 dev_err(adev->dev, "(%d) failed to allocate wb slot\n", r);
606 return r; 606 return r;
@@ -613,7 +613,7 @@ static int sdma_v2_4_ring_test_ring(struct amdgpu_ring *ring)
613 r = amdgpu_ring_alloc(ring, 5); 613 r = amdgpu_ring_alloc(ring, 5);
614 if (r) { 614 if (r) {
615 DRM_ERROR("amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, r); 615 DRM_ERROR("amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, r);
616 amdgpu_wb_free(adev, index); 616 amdgpu_device_wb_free(adev, index);
617 return r; 617 return r;
618 } 618 }
619 619
@@ -639,7 +639,7 @@ static int sdma_v2_4_ring_test_ring(struct amdgpu_ring *ring)
639 ring->idx, tmp); 639 ring->idx, tmp);
640 r = -EINVAL; 640 r = -EINVAL;
641 } 641 }
642 amdgpu_wb_free(adev, index); 642 amdgpu_device_wb_free(adev, index);
643 643
644 return r; 644 return r;
645} 645}
@@ -662,7 +662,7 @@ static int sdma_v2_4_ring_test_ib(struct amdgpu_ring *ring, long timeout)
662 u64 gpu_addr; 662 u64 gpu_addr;
663 long r; 663 long r;
664 664
665 r = amdgpu_wb_get(adev, &index); 665 r = amdgpu_device_wb_get(adev, &index);
666 if (r) { 666 if (r) {
667 dev_err(adev->dev, "(%ld) failed to allocate wb slot\n", r); 667 dev_err(adev->dev, "(%ld) failed to allocate wb slot\n", r);
668 return r; 668 return r;
@@ -715,7 +715,7 @@ err1:
715 amdgpu_ib_free(adev, &ib, NULL); 715 amdgpu_ib_free(adev, &ib, NULL);
716 dma_fence_put(f); 716 dma_fence_put(f);
717err0: 717err0:
718 amdgpu_wb_free(adev, index); 718 amdgpu_device_wb_free(adev, index);
719 return r; 719 return r;
720} 720}
721 721
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
index 41c60f5ac96e..4e031a2aad9d 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
@@ -867,7 +867,7 @@ static int sdma_v3_0_ring_test_ring(struct amdgpu_ring *ring)
867 u32 tmp; 867 u32 tmp;
868 u64 gpu_addr; 868 u64 gpu_addr;
869 869
870 r = amdgpu_wb_get(adev, &index); 870 r = amdgpu_device_wb_get(adev, &index);
871 if (r) { 871 if (r) {
872 dev_err(adev->dev, "(%d) failed to allocate wb slot\n", r); 872 dev_err(adev->dev, "(%d) failed to allocate wb slot\n", r);
873 return r; 873 return r;
@@ -880,7 +880,7 @@ static int sdma_v3_0_ring_test_ring(struct amdgpu_ring *ring)
880 r = amdgpu_ring_alloc(ring, 5); 880 r = amdgpu_ring_alloc(ring, 5);
881 if (r) { 881 if (r) {
882 DRM_ERROR("amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, r); 882 DRM_ERROR("amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, r);
883 amdgpu_wb_free(adev, index); 883 amdgpu_device_wb_free(adev, index);
884 return r; 884 return r;
885 } 885 }
886 886
@@ -906,7 +906,7 @@ static int sdma_v3_0_ring_test_ring(struct amdgpu_ring *ring)
906 ring->idx, tmp); 906 ring->idx, tmp);
907 r = -EINVAL; 907 r = -EINVAL;
908 } 908 }
909 amdgpu_wb_free(adev, index); 909 amdgpu_device_wb_free(adev, index);
910 910
911 return r; 911 return r;
912} 912}
@@ -929,7 +929,7 @@ static int sdma_v3_0_ring_test_ib(struct amdgpu_ring *ring, long timeout)
929 u64 gpu_addr; 929 u64 gpu_addr;
930 long r; 930 long r;
931 931
932 r = amdgpu_wb_get(adev, &index); 932 r = amdgpu_device_wb_get(adev, &index);
933 if (r) { 933 if (r) {
934 dev_err(adev->dev, "(%ld) failed to allocate wb slot\n", r); 934 dev_err(adev->dev, "(%ld) failed to allocate wb slot\n", r);
935 return r; 935 return r;
@@ -981,7 +981,7 @@ err1:
981 amdgpu_ib_free(adev, &ib, NULL); 981 amdgpu_ib_free(adev, &ib, NULL);
982 dma_fence_put(f); 982 dma_fence_put(f);
983err0: 983err0:
984 amdgpu_wb_free(adev, index); 984 amdgpu_device_wb_free(adev, index);
985 return r; 985 return r;
986} 986}
987 987
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index 79e82bf35f7d..73477c5ed9b4 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -869,7 +869,7 @@ static int sdma_v4_0_ring_test_ring(struct amdgpu_ring *ring)
869 u32 tmp; 869 u32 tmp;
870 u64 gpu_addr; 870 u64 gpu_addr;
871 871
872 r = amdgpu_wb_get(adev, &index); 872 r = amdgpu_device_wb_get(adev, &index);
873 if (r) { 873 if (r) {
874 dev_err(adev->dev, "(%d) failed to allocate wb slot\n", r); 874 dev_err(adev->dev, "(%d) failed to allocate wb slot\n", r);
875 return r; 875 return r;
@@ -882,7 +882,7 @@ static int sdma_v4_0_ring_test_ring(struct amdgpu_ring *ring)
882 r = amdgpu_ring_alloc(ring, 5); 882 r = amdgpu_ring_alloc(ring, 5);
883 if (r) { 883 if (r) {
884 DRM_ERROR("amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, r); 884 DRM_ERROR("amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, r);
885 amdgpu_wb_free(adev, index); 885 amdgpu_device_wb_free(adev, index);
886 return r; 886 return r;
887 } 887 }
888 888
@@ -908,7 +908,7 @@ static int sdma_v4_0_ring_test_ring(struct amdgpu_ring *ring)
908 ring->idx, tmp); 908 ring->idx, tmp);
909 r = -EINVAL; 909 r = -EINVAL;
910 } 910 }
911 amdgpu_wb_free(adev, index); 911 amdgpu_device_wb_free(adev, index);
912 912
913 return r; 913 return r;
914} 914}
@@ -931,7 +931,7 @@ static int sdma_v4_0_ring_test_ib(struct amdgpu_ring *ring, long timeout)
931 u32 tmp = 0; 931 u32 tmp = 0;
932 u64 gpu_addr; 932 u64 gpu_addr;
933 933
934 r = amdgpu_wb_get(adev, &index); 934 r = amdgpu_device_wb_get(adev, &index);
935 if (r) { 935 if (r) {
936 dev_err(adev->dev, "(%ld) failed to allocate wb slot\n", r); 936 dev_err(adev->dev, "(%ld) failed to allocate wb slot\n", r);
937 return r; 937 return r;
@@ -983,7 +983,7 @@ err1:
983 amdgpu_ib_free(adev, &ib, NULL); 983 amdgpu_ib_free(adev, &ib, NULL);
984 dma_fence_put(f); 984 dma_fence_put(f);
985err0: 985err0:
986 amdgpu_wb_free(adev, index); 986 amdgpu_device_wb_free(adev, index);
987 return r; 987 return r;
988} 988}
989 989
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c b/drivers/gpu/drm/amd/amdgpu/si_dma.c
index ee469a906cd3..9adca5d8b045 100644
--- a/drivers/gpu/drm/amd/amdgpu/si_dma.c
+++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c
@@ -221,7 +221,7 @@ static int si_dma_ring_test_ring(struct amdgpu_ring *ring)
221 u32 tmp; 221 u32 tmp;
222 u64 gpu_addr; 222 u64 gpu_addr;
223 223
224 r = amdgpu_wb_get(adev, &index); 224 r = amdgpu_device_wb_get(adev, &index);
225 if (r) { 225 if (r) {
226 dev_err(adev->dev, "(%d) failed to allocate wb slot\n", r); 226 dev_err(adev->dev, "(%d) failed to allocate wb slot\n", r);
227 return r; 227 return r;
@@ -234,7 +234,7 @@ static int si_dma_ring_test_ring(struct amdgpu_ring *ring)
234 r = amdgpu_ring_alloc(ring, 4); 234 r = amdgpu_ring_alloc(ring, 4);
235 if (r) { 235 if (r) {
236 DRM_ERROR("amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, r); 236 DRM_ERROR("amdgpu: dma failed to lock ring %d (%d).\n", ring->idx, r);
237 amdgpu_wb_free(adev, index); 237 amdgpu_device_wb_free(adev, index);
238 return r; 238 return r;
239 } 239 }
240 240
@@ -258,7 +258,7 @@ static int si_dma_ring_test_ring(struct amdgpu_ring *ring)
258 ring->idx, tmp); 258 ring->idx, tmp);
259 r = -EINVAL; 259 r = -EINVAL;
260 } 260 }
261 amdgpu_wb_free(adev, index); 261 amdgpu_device_wb_free(adev, index);
262 262
263 return r; 263 return r;
264} 264}
@@ -281,7 +281,7 @@ static int si_dma_ring_test_ib(struct amdgpu_ring *ring, long timeout)
281 u64 gpu_addr; 281 u64 gpu_addr;
282 long r; 282 long r;
283 283
284 r = amdgpu_wb_get(adev, &index); 284 r = amdgpu_device_wb_get(adev, &index);
285 if (r) { 285 if (r) {
286 dev_err(adev->dev, "(%ld) failed to allocate wb slot\n", r); 286 dev_err(adev->dev, "(%ld) failed to allocate wb slot\n", r);
287 return r; 287 return r;
@@ -328,7 +328,7 @@ err1:
328 amdgpu_ib_free(adev, &ib, NULL); 328 amdgpu_ib_free(adev, &ib, NULL);
329 dma_fence_put(f); 329 dma_fence_put(f);
330err0: 330err0:
331 amdgpu_wb_free(adev, index); 331 amdgpu_device_wb_free(adev, index);
332 return r; 332 return r;
333} 333}
334 334