mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
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:89d2dac554"radeonsi: enable preemption if the kernel enabled it" Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Qiang Yu <yuq825@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6577> (cherry picked from commit3d5bed0e88)
This commit is contained in:
parent
04cb446d4a
commit
3b68d713f5
2 changed files with 8 additions and 2 deletions
|
|
@ -1714,7 +1714,7 @@
|
|||
"description": "radeonsi: fix user fence space when MCBP is enabled",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "89d2dac55486464832552dfc3349054c29a82922"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue