}
bool
-iris_check_syncpt(struct pipe_screen *p_screen,
- struct iris_syncpt *syncpt)
+iris_wait_syncpt(struct pipe_screen *p_screen,
+ struct iris_syncpt *syncpt,
+ int64_t timeout_nsec)
{
if (!syncpt)
return false;
struct drm_syncobj_wait args = {
.handles = (uintptr_t)&syncpt->handle,
.count_handles = 1,
+ .timeout_nsec = timeout_nsec,
};
return drm_ioctl(screen->fd, DRM_IOCTL_SYNCOBJ_WAIT, &args);
}
pipe_reference_init(&fence->ref, 1);
for (unsigned b = 0; b < IRIS_BATCH_COUNT; b++) {
- if (!iris_check_syncpt(ctx->screen, ice->batches[b].last_syncpt))
+ if (!iris_wait_syncpt(ctx->screen, ice->batches[b].last_syncpt, 0))
continue;
iris_syncpt_reference(screen, &fence->syncpt[fence->count++],
void iris_batch_add_syncpt(struct iris_batch *batch,
struct iris_syncpt *syncpt,
unsigned flags);
-bool iris_check_syncpt(struct pipe_screen *screen,
- struct iris_syncpt *syncpt);
+bool iris_wait_syncpt(struct pipe_screen *screen,
+ struct iris_syncpt *syncpt,
+ int64_t timeout_nsec);
static inline void
iris_syncpt_reference(struct iris_screen *screen,
struct iris_syncpt **dst,
while (!q->map->snapshots_landed) {
if (wait)
- iris_check_syncpt(ctx->screen, q->syncpt);
+ iris_wait_syncpt(ctx->screen, q->syncpt, 0);
else
return false;
}