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:
committed by
Marge Bot
parent
14e3231b56
commit
acbfcb4d36
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user