diff options
author | Christian König <christian.koenig@amd.com> | 2018-10-29 09:56:34 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-05 14:21:26 -0500 |
commit | 315fed0367b4b4197cdc9585d09a1e659ae6c716 (patch) | |
tree | 9229795c4c8df927885cfa6398ebc2e2982e8a54 /drivers/gpu/drm/amd | |
parent | af70a471bf067d4e808eff2b9c464e6055c98d49 (diff) |
drm/amdgpu: cleanup skipping IB test on KIQ
Instead of hard coding the ring type in the function just never provide
a test_ib callback.
Additional to that remove the emit_ib callback to make sure the nobody
ever tries to execute an IB on the KIQ.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 |
3 files changed, 3 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index c514bb9e94a0..ec0e6238dbc3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |||
@@ -351,15 +351,10 @@ 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->sched.ready) | 354 | /* KIQ rings don't have an IB test because we never submit IBs |
355 | continue; | 355 | * to them and they have no interrupt support. |
356 | |||
357 | /* skip IB tests for KIQ in general for the below reasons: | ||
358 | * 1. We never submit IBs to the KIQ | ||
359 | * 2. KIQ doesn't use the EOP interrupts, | ||
360 | * we use some other CP interrupt. | ||
361 | */ | 356 | */ |
362 | if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ) | 357 | if (!ring->sched.ready || !ring->funcs->test_ib) |
363 | continue; | 358 | continue; |
364 | 359 | ||
365 | /* MM engine need more time */ | 360 | /* MM engine need more time */ |
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index 45dda5684083..740c73aa7b45 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | |||
@@ -6989,10 +6989,8 @@ static const struct amdgpu_ring_funcs gfx_v8_0_ring_funcs_kiq = { | |||
6989 | 17 + /* gfx_v8_0_ring_emit_vm_flush */ | 6989 | 17 + /* gfx_v8_0_ring_emit_vm_flush */ |
6990 | 7 + 7 + 7, /* gfx_v8_0_ring_emit_fence_kiq x3 for user fence, vm fence */ | 6990 | 7 + 7 + 7, /* gfx_v8_0_ring_emit_fence_kiq x3 for user fence, vm fence */ |
6991 | .emit_ib_size = 4, /* gfx_v8_0_ring_emit_ib_compute */ | 6991 | .emit_ib_size = 4, /* gfx_v8_0_ring_emit_ib_compute */ |
6992 | .emit_ib = gfx_v8_0_ring_emit_ib_compute, | ||
6993 | .emit_fence = gfx_v8_0_ring_emit_fence_kiq, | 6992 | .emit_fence = gfx_v8_0_ring_emit_fence_kiq, |
6994 | .test_ring = gfx_v8_0_ring_test_ring, | 6993 | .test_ring = gfx_v8_0_ring_test_ring, |
6995 | .test_ib = gfx_v8_0_ring_test_ib, | ||
6996 | .insert_nop = amdgpu_ring_insert_nop, | 6994 | .insert_nop = amdgpu_ring_insert_nop, |
6997 | .pad_ib = amdgpu_ring_generic_pad_ib, | 6995 | .pad_ib = amdgpu_ring_generic_pad_ib, |
6998 | .emit_rreg = gfx_v8_0_ring_emit_rreg, | 6996 | .emit_rreg = gfx_v8_0_ring_emit_rreg, |
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c index 9248ef08bb37..67c011d7f1a6 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | |||
@@ -4848,10 +4848,8 @@ static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = { | |||
4848 | 2 + /* gfx_v9_0_ring_emit_vm_flush */ | 4848 | 2 + /* gfx_v9_0_ring_emit_vm_flush */ |
4849 | 8 + 8 + 8, /* gfx_v9_0_ring_emit_fence_kiq x3 for user fence, vm fence */ | 4849 | 8 + 8 + 8, /* gfx_v9_0_ring_emit_fence_kiq x3 for user fence, vm fence */ |
4850 | .emit_ib_size = 4, /* gfx_v9_0_ring_emit_ib_compute */ | 4850 | .emit_ib_size = 4, /* gfx_v9_0_ring_emit_ib_compute */ |
4851 | .emit_ib = gfx_v9_0_ring_emit_ib_compute, | ||
4852 | .emit_fence = gfx_v9_0_ring_emit_fence_kiq, | 4851 | .emit_fence = gfx_v9_0_ring_emit_fence_kiq, |
4853 | .test_ring = gfx_v9_0_ring_test_ring, | 4852 | .test_ring = gfx_v9_0_ring_test_ring, |
4854 | .test_ib = gfx_v9_0_ring_test_ib, | ||
4855 | .insert_nop = amdgpu_ring_insert_nop, | 4853 | .insert_nop = amdgpu_ring_insert_nop, |
4856 | .pad_ib = amdgpu_ring_generic_pad_ib, | 4854 | .pad_ib = amdgpu_ring_generic_pad_ib, |
4857 | .emit_rreg = gfx_v9_0_ring_emit_rreg, | 4855 | .emit_rreg = gfx_v9_0_ring_emit_rreg, |