[PATCH 11/12 v2] drm/i915: wait render timeout ioctl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 26 Apr 2012 16:03:08 -0700, Ben Widawsky <ben at bwidawsk.net> wrote:
> This helps implement glClientWaitSync.
> 
> Finally we can use the new timed seqno waiting function to allow
> userspace to wait on a request with a timeout. This implements that
> interface.
> 
> The new ioctl is very straight forward, there is a flags field which I
> envision may be useful for various flush permutations of the command.

What are the semantics of the ioctl? A simple use case would help
specify the interface here.

In particular, I can't tell whether the return value (timeout_ns) is
meant to be the time elapsed or the time remaining.  What value is
returned in the timeout if we are interrupted before the wait completes?
Would
  end = gettimeofday() + timeout;
  do {
    ret = i915_gem_wait(handle, 0, &timeout);
  } while (ret == -1 && errno == EINTR);
  assert(gettimeofday() <= end);
wait forever, or until the original timeout expires?
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux