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/amdgpu_ib.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/amdgpu_ib.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index b8963b725dfa..fc74f40a5912 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |||
@@ -146,7 +146,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, | |||
146 | fence_ctx = 0; | 146 | fence_ctx = 0; |
147 | } | 147 | } |
148 | 148 | ||
149 | if (!ring->ready) { | 149 | if (!ring->sched.ready) { |
150 | dev_err(adev->dev, "couldn't schedule ib on ring <%s>\n", ring->name); | 150 | dev_err(adev->dev, "couldn't schedule ib on ring <%s>\n", ring->name); |
151 | return -EINVAL; | 151 | return -EINVAL; |
152 | } | 152 | } |
@@ -351,7 +351,7 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev) | |||
351 | struct amdgpu_ring *ring = adev->rings[i]; | 351 | struct amdgpu_ring *ring = adev->rings[i]; |
352 | long tmo; | 352 | long tmo; |
353 | 353 | ||
354 | if (!ring || !ring->ready) | 354 | if (!ring || !ring->sched.ready) |
355 | continue; | 355 | continue; |
356 | 356 | ||
357 | /* skip IB tests for KIQ in general for the below reasons: | 357 | /* skip IB tests for KIQ in general for the below reasons: |
@@ -375,7 +375,7 @@ int amdgpu_ib_ring_tests(struct amdgpu_device *adev) | |||
375 | 375 | ||
376 | r = amdgpu_ring_test_ib(ring, tmo); | 376 | r = amdgpu_ring_test_ib(ring, tmo); |
377 | if (r) { | 377 | if (r) { |
378 | ring->ready = false; | 378 | ring->sched.ready = false; |
379 | 379 | ||
380 | if (ring == &adev->gfx.gfx_ring[0]) { | 380 | if (ring == &adev->gfx.gfx_ring[0]) { |
381 | /* oh, oh, that's really bad */ | 381 | /* oh, oh, that's really bad */ |