diff options
author | Andrey Grodzovsky <andrey.grodzovsky@amd.com> | 2018-10-19 16:22:48 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-05 14:21:23 -0500 |
commit | c66ed765a0a97b8900f37d4a71f1d75f52f56eeb (patch) | |
tree | cfed66df4fc6088c761e1d5cce16a300af57c0df /drivers/gpu/drm/amd/amdgpu/cik_sdma.c | |
parent | faf6e1a87e07423a729e04fb2e8188742e89ea4c (diff) |
drm/amdgpu: Retire amdgpu_ring.ready flag v4
Start using drm_gpu_scheduler.ready isntead.
v3:
Add helper function to run ring test and set
sched.ready flag status accordingly, clean explicit
sched.ready sets from the IP specific files.
v4: Add kerneldoc and rebase.
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/cik_sdma.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c index 32eb43d165f2..561406a1cf88 100644 --- a/drivers/gpu/drm/amd/amdgpu/cik_sdma.c +++ b/drivers/gpu/drm/amd/amdgpu/cik_sdma.c | |||
@@ -316,8 +316,8 @@ static void cik_sdma_gfx_stop(struct amdgpu_device *adev) | |||
316 | WREG32(mmSDMA0_GFX_RB_CNTL + sdma_offsets[i], rb_cntl); | 316 | WREG32(mmSDMA0_GFX_RB_CNTL + sdma_offsets[i], rb_cntl); |
317 | WREG32(mmSDMA0_GFX_IB_CNTL + sdma_offsets[i], 0); | 317 | WREG32(mmSDMA0_GFX_IB_CNTL + sdma_offsets[i], 0); |
318 | } | 318 | } |
319 | sdma0->ready = false; | 319 | sdma0->sched.ready = false; |
320 | sdma1->ready = false; | 320 | sdma1->sched.ready = false; |
321 | } | 321 | } |
322 | 322 | ||
323 | /** | 323 | /** |
@@ -494,18 +494,16 @@ static int cik_sdma_gfx_resume(struct amdgpu_device *adev) | |||
494 | /* enable DMA IBs */ | 494 | /* enable DMA IBs */ |
495 | WREG32(mmSDMA0_GFX_IB_CNTL + sdma_offsets[i], ib_cntl); | 495 | WREG32(mmSDMA0_GFX_IB_CNTL + sdma_offsets[i], ib_cntl); |
496 | 496 | ||
497 | ring->ready = true; | 497 | ring->sched.ready = true; |
498 | } | 498 | } |
499 | 499 | ||
500 | cik_sdma_enable(adev, true); | 500 | cik_sdma_enable(adev, true); |
501 | 501 | ||
502 | for (i = 0; i < adev->sdma.num_instances; i++) { | 502 | for (i = 0; i < adev->sdma.num_instances; i++) { |
503 | ring = &adev->sdma.instance[i].ring; | 503 | ring = &adev->sdma.instance[i].ring; |
504 | r = amdgpu_ring_test_ring(ring); | 504 | r = amdgpu_ring_test_helper(ring); |
505 | if (r) { | 505 | if (r) |
506 | ring->ready = false; | ||
507 | return r; | 506 | return r; |
508 | } | ||
509 | 507 | ||
510 | if (adev->mman.buffer_funcs_ring == ring) | 508 | if (adev->mman.buffer_funcs_ring == ring) |
511 | amdgpu_ttm_set_buffer_funcs_status(adev, true); | 509 | amdgpu_ttm_set_buffer_funcs_status(adev, true); |