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>main
parent
5463d2e83a
commit
95ecf91c7b
|
@ -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…
Reference in New Issue