Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

amd/amdgpu: remove test ib on hw ring

test ib function is not necessary on hw ring,
so remove it.

v2: squash in NULL check fix

Signed-off-by: JesseZhang <Jesse.Zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

JesseZhang and committed by
Alex Deucher
6c1a6d0b 5ad7bbf3

+1 -2
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h
··· 295 295 #define amdgpu_ring_parse_cs(r, p, job, ib) ((r)->funcs->parse_cs((p), (job), (ib))) 296 296 #define amdgpu_ring_patch_cs_in_place(r, p, job, ib) ((r)->funcs->patch_cs_in_place((p), (job), (ib))) 297 297 #define amdgpu_ring_test_ring(r) (r)->funcs->test_ring((r)) 298 - #define amdgpu_ring_test_ib(r, t) (r)->funcs->test_ib((r), (t)) 298 + #define amdgpu_ring_test_ib(r, t) ((r)->funcs->test_ib ? (r)->funcs->test_ib((r), (t)) : 0) 299 299 #define amdgpu_ring_get_rptr(r) (r)->funcs->get_rptr((r)) 300 300 #define amdgpu_ring_get_wptr(r) (r)->funcs->get_wptr((r)) 301 301 #define amdgpu_ring_set_wptr(r) (r)->funcs->set_wptr((r))
-1
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
··· 6877 6877 .emit_gds_switch = gfx_v9_0_ring_emit_gds_switch, 6878 6878 .emit_hdp_flush = gfx_v9_0_ring_emit_hdp_flush, 6879 6879 .test_ring = gfx_v9_0_ring_test_ring, 6880 - .test_ib = gfx_v9_0_ring_test_ib, 6881 6880 .insert_nop = amdgpu_ring_insert_nop, 6882 6881 .pad_ib = amdgpu_ring_generic_pad_ib, 6883 6882 .emit_switch_buffer = gfx_v9_ring_emit_sb,