On Fri, May 12, 2017 at 10:34:54AM +1000, Dave Airlie wrote:
+static int drm_syncobj_wait_all_fences(struct drm_device *dev,
struct drm_file *file_private,
struct drm_syncobj_wait *wait,
uint32_t *handles)
+{
- uint32_t i;
- int ret = 0;
- unsigned long timeout = nsecs_to_jiffies(wait->timeout_ns);
- for (i = 0; i < wait->count_handles; i++) {
struct dma_fence *fence;
ret = drm_syncobj_fence_get(file_private, handles[i],
&fence);
if (ret)
return ret;
if (!fence)
continue;
ret = dma_fence_wait_timeout(fence, true, timeout);
Doesn't handle -EINTR yet with timeout. If having a drmIoctl() that can't be tricked into turning a short waiting into an indefinite one is a goal. -Chris