mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-05 06:38:03 +02:00
amdgpu: Use drmIoctl in amdgpu_ioctl_wait_cs
This is safe now because the ioctl uses an absolute timeout. This prevents amdgpu_cs_query_fence_status from returning early e.g. when a signal is delivered, which in turn caused Mesa winsys code to assume a BO was idle when it actually wasn't yet. Reviewed-by: Christian König <christian.koenig@amd.com>
This commit is contained in:
parent
5463d2e83a
commit
95ecf91c7b
1 changed files with 2 additions and 6 deletions
|
|
@ -367,12 +367,8 @@ static int amdgpu_ioctl_wait_cs(amdgpu_context_handle context,
|
|||
else
|
||||
args.in.timeout = amdgpu_cs_calculate_timeout(timeout_ns);
|
||||
|
||||
/* Handle errors manually here because of timeout */
|
||||
r = ioctl(dev->fd, DRM_IOCTL_AMDGPU_WAIT_CS, &args);
|
||||
if (r == -1 && (errno == EINTR || errno == EAGAIN)) {
|
||||
*busy = true;
|
||||
return 0;
|
||||
} else if (r)
|
||||
r = drmIoctl(dev->fd, DRM_IOCTL_AMDGPU_WAIT_CS, &args);
|
||||
if (r)
|
||||
return -errno;
|
||||
|
||||
*busy = args.out.status;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue