aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter2015-03-06 11:56:57 -0600
committerDaniel Vetter2015-03-06 11:57:51 -0600
commitfcff9e21652c94444be565e915b117ee069227a9 (patch)
treedffd5a2ef8c9bd8cafc1f1c61c8c68771fb9589d
parent080b4929b7452dc1fea32ac1d32e7e571e7fb38b (diff)
downloadexternal-libdrm-fcff9e21652c94444be565e915b117ee069227a9.tar.gz
external-libdrm-fcff9e21652c94444be565e915b117ee069227a9.tar.xz
external-libdrm-fcff9e21652c94444be565e915b117ee069227a9.zip
Revert "intel: Fix documentation for drm_intel_gem_bo_wait()"
This reverts commit 080b4929b7452dc1fea32ac1d32e7e571e7fb38b. Chris noticed that "negative values wait forever" is indeed intended behaviour and the issue is just that we didn't have a testcase (fixed now) and that a regression slipped through (fixed and on track for all stable kernels). So lets undo the documentation change for consistency, since working around kernel regressions isn't good. Practical impact is nil anyway. v2: Add a note to docs that some kernels have been broken. v3: Remove the random garbage included by accident. Cc: Kristian Høgsberg <krh@bitplanet.net> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Kristian Høgsberg <krh@bitplanet.net> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
-rw-r--r--intel/intel_bufmgr_gem.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 33d8fbc4..acbfd4ad 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1655,14 +1655,12 @@ 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 or equal to 0, return immediately. 1658 * If value is less than 0, an infinite wait will occur.
1659 * 1659 *
1660 * Returns 0 if the wait was successful ie. the last batch referencing 1660 * Returns 0 if the wait was successful ie. the last batch referencing the
1661 * the object has completed within the allotted time. Otherwise some 1661 * object has completed within the allotted time. Otherwise some negative return
1662 * negative return value describes the error. Of particular interest 1662 * value describes the error. Of particular interest is -ETIME when the wait has
1663 * is -ETIME when the wait has failed to yield the desired result. 1663 * failed to yield the desired result.
1664 * Use a timeout of INT64_MAX to wait indefinitely (well, at least 292
1665 * years).
1666 * 1664 *
1667 * Similar to drm_intel_gem_bo_wait_rendering except a timeout parameter allows 1665 * Similar to drm_intel_gem_bo_wait_rendering except a timeout parameter allows
1668 * the operation to give up after a certain amount of time. Another subtle 1666 * the operation to give up after a certain amount of time. Another subtle
@@ -1675,6 +1673,9 @@ drm_intel_gem_bo_wait_rendering(drm_intel_bo *bo)
1675 * not guarantee that the buffer is re-issued via another thread, or an flinked 1673 * not guarantee that the buffer is re-issued via another thread, or an flinked
1676 * handle. Userspace must make sure this race does not occur if such precision 1674 * handle. Userspace must make sure this race does not occur if such precision
1677 * is important. 1675 * is important.
1676 *
1677 * Note that some kernels have broken the inifite wait for negative values
1678 * promise, upgrade to latest stable kernels if this is the case.
1678 */ 1679 */
1679drm_public int 1680drm_public int
1680drm_intel_gem_bo_wait(drm_intel_bo *bo, int64_t timeout_ns) 1681drm_intel_gem_bo_wait(drm_intel_bo *bo, int64_t timeout_ns)