Commit 3d5bed0e authored by Qiang Yu's avatar Qiang Yu Committed by Marge Bot
Browse files

radeonsi: fix user fence space when MCBP is enabled

When MCBP is enabled, IB maybe preempted which will also update
the preempted fence field of the user fence. So we need to reserve
enough space for each user fence.

Fixes: 89d2dac5

 "radeonsi: enable preemption if the kernel enabled it"
Reviewed-by: default avatarMarek Olšák <>
Signed-off-by: Qiang Yu's avatarQiang Yu <>
Part-of: <!6577>
parent c638301b
Pipeline #198765 waiting for manual action with stages
......@@ -1683,8 +1683,14 @@ finalize:
/* Success. */
uint64_t *user_fence = NULL;
/* Need to reserve 4 QWORD for user fence:
* QWORD[0]: completed fence
* QWORD[1]: preempted fence
* QWORD[2]: reset fence
* QWORD[3]: preempted then reset
if (has_user_fence)
user_fence = acs->ctx->user_fence_cpu_address_base + acs->ring_type;
user_fence = acs->ctx->user_fence_cpu_address_base + acs->ring_type * 4;
amdgpu_fence_submitted(cs->fence, seq_no, user_fence);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment