aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian Høgsberg2015-02-28 11:31:58 -0600
committerKristian Høgsberg2015-03-02 18:14:13 -0600
commit080b4929b7452dc1fea32ac1d32e7e571e7fb38b (patch)
treee7d4d3e617dade6e8dfa71c167cea535d20c67cc
parentf799a527db2851b2890146a9ce777f73fea30176 (diff)
downloadexternal-libdrm-080b4929b7452dc1fea32ac1d32e7e571e7fb38b.tar.gz
external-libdrm-080b4929b7452dc1fea32ac1d32e7e571e7fb38b.tar.xz
external-libdrm-080b4929b7452dc1fea32ac1d32e7e571e7fb38b.zip
intel: Fix documentation for drm_intel_gem_bo_wait()
The kernel doesn't actually wait indefinately when passed a negative, timeout, it returns immediately. Document this and suggest using INT64_MAX for indefinite waits. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--intel/intel_bufmgr_gem.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 78875fd3..33d8fbc4 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1655,12 +1655,14 @@ drm_intel_gem_bo_wait_rendering(drm_intel_bo *bo)
1655 * 1655 *
1656 * @bo: buffer object to wait for 1656 * @bo: buffer object to wait for
1657 * @timeout_ns: amount of time to wait in nanoseconds. 1657 * @timeout_ns: amount of time to wait in nanoseconds.
1658 * If value is less than 0, an infinite wait will occur. 1658 * If value is less than or equal to 0, return immediately.
1659 * 1659 *
1660 * Returns 0 if the wait was successful ie. the last batch referencing the 1660 * Returns 0 if the wait was successful ie. the last batch referencing
1661 * object has completed within the allotted time. Otherwise some negative return 1661 * the object has completed within the allotted time. Otherwise some
1662 * value describes the error. Of particular interest is -ETIME when the wait has 1662 * negative return value describes the error. Of particular interest
1663 * failed to yield the desired result. 1663 * is -ETIME when the wait has failed to yield the desired result.
1664 * Use a timeout of INT64_MAX to wait indefinitely (well, at least 292
1665 * years).
1664 * 1666 *
1665 * Similar to drm_intel_gem_bo_wait_rendering except a timeout parameter allows 1667 * Similar to drm_intel_gem_bo_wait_rendering except a timeout parameter allows
1666 * the operation to give up after a certain amount of time. Another subtle 1668 * the operation to give up after a certain amount of time. Another subtle