drm/amdgpu: do not execute 0-sized IBs
Am 03.10.2019 10:25 schrieb "Pelloux-prayer, Pierre-eric" <[email protected]>:
Quoted 5 lines · Christian König
Am 03.10.19 um 10:03 schrieb Pelloux-prayer, Pierre-eric:
Quoted 2 lines
This can be safely skipped entirely.
This seems to help with https://bugs.freedesktop.org/show_bug.cgi?id=111481.NAK, please instead fix
gmc_v10_0_flush_gpu_tlbto include at least some NOP in the submitted IBs.
Is there any interest in executing an empty (or only filled with NOPs) IB?
Yeah, we used to have some dummy zero sized IBs for the MM engines which otherwise couldn't execute a fence command.
It shouldn't matter for modern firmware/hardware, but you could actually silently break somewhere else with this, so better not do this.
Sorry should have mentioned that directly,
Christian.
Anyway I can modify the patch to do this.
Thanks,
Pierre-Eric
Quoted 9 lines
Christian.
Quoted 6 lines
Signed-off-by Pierre-Eric Pelloux-Prayer <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 5 +++++ 1 file changed, 5 insertions(+)
Quoted 16 lines
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +0
-0drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, · line 236
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +4
-0@@ -227,6 +227,11 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, !amdgpu_sriov_vf(adev)) /* for SRIOV preemption, Preamble CE ib must be inserted anyway */continue ; + if (ib->length_dw == 0) { +/* On Navi gmc_v10_0_flush_gpu_tlb emits 0 sized IB */ +continue ; + } +amdgpu_ring_emit_ib (ring, job, ib, status); status &= ~AMDGPU_HAVE_CTX_SWITCH ; }
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx