intel: wait render timeout implementation
authorBen Widawsky <ben@bwidawsk.net>
Tue, 5 Jun 2012 18:30:48 +0000 (11:30 -0700)
committerBen Widawsky <ben@bwidawsk.net>
Wed, 27 Jun 2012 16:00:58 +0000 (09:00 -0700)
commit971c080ac0eb8f0531fe3ebabc5b9e585db992b6
tree1eedf95d4f6be613147c8b08deb5f2740ce83da0
parentae137f4669ccdbc615d18facebdb804a9af9846b
intel: wait render timeout implementation

int drm_intel_gem_bo_wait(drm_intel_bo *bo, uint64_t timeout_ns)

This should bump the libdrm version. We're waiting for context support
so we can do both features in one bump.

v2: don't return remaining timeout amount
use get param and fallback for older kernels

v3: only doing getparam at init
prototypes now have a signed input value

v4: update comments
fall back to correct polling behavior with new userspace and old kernel

v5: since the drmIoctl patch was not well received, return appropriate
values in this function instead. As Daniel pointed out, the polling
case (timeout == 0) should also return -ETIME.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
intel/intel_bufmgr.h
intel/intel_bufmgr_gem.c