[PATCH 04/10] drm/amdgpu: set the exec flag on the IB fence

Alex Deucher alexander.deucher at amd.com
Thu May 22 21:55:53 UTC 2025


This is to make sure the CP executes this packet in
the event of a preemption or reset.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
index 802743efa3b39..d74bd6dffcbd0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
@@ -274,7 +274,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned int num_ibs,
 	/* wrap the last IB with fence */
 	if (job && job->uf_addr) {
 		amdgpu_ring_emit_fence(ring, job->uf_addr, job->uf_sequence,
-				       fence_flags | AMDGPU_FENCE_FLAG_64BIT);
+				       fence_flags | AMDGPU_FENCE_FLAG_64BIT |
+				       AMDGPU_FENCE_FLAG_EXEC);
 	}
 
 	if (ring->funcs->emit_gfx_shadow && ring->funcs->init_cond_exec) {
-- 
2.49.0



More information about the amd-gfx mailing list