mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
winsys/amdgpu: ring doorbell before calling userq_signal ioctl
The signal ioctl should only be called after guaranteeing that the hardware started working on the submissions and that is only after doorbell is ringed. Otherwise it can in theory happen that the application creates the fence and is then interrupted before ringing the doorbell. That can result in a GPU reset because the fence times out. Suggested-by: Christian König <christian.koenig@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32700>
This commit is contained in:
parent
14e3231b56
commit
acbfcb4d36
1 changed files with 1 additions and 2 deletions
|
|
@ -1548,9 +1548,8 @@ static int amdgpu_cs_submit_ib_userq(struct amdgpu_userq *userq,
|
|||
.num_bo_write_handles = num_shared_buf_write,
|
||||
};
|
||||
|
||||
userq->doorbell_bo_map[AMDGPU_USERQ_DOORBELL_INDEX] = *userq->wptr_bo_map;
|
||||
r = ac_drm_userq_signal(aws->dev, &userq_signal_data);
|
||||
if (!r)
|
||||
userq->doorbell_bo_map[AMDGPU_USERQ_DOORBELL_INDEX] = *userq->wptr_bo_map;
|
||||
|
||||
*seq_no = userq->user_fence_seq_num;
|
||||
simple_mtx_unlock(&userq->lock);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue