Revert "intel: Fix documentation for drm_intel_gem_bo_wait()"
PATCH 1/1 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.
--- intel/intel_bufmgr_gem.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
intel/intel_bufmgr_gem.c +8 -7
@@ -1655,14 +1655,12 @@ drm_intel_gem_bo_wait_rendering(drm_intel_bo *bo)* * @bo: buffer object to wait for * @timeout_ns: amount of time to wait in nanoseconds. -* If value is less than or equal to 0, return immediately. +* If value is less than 0, an infinite wait will occur. * -* Returns 0 if the wait was successful ie. the last batch referencing -* the object has completed within the allotted time. Otherwise some -* negative return value describes the error. Of particular interest -* is -ETIME when the wait has failed to yield the desired result. -* Use a timeout of INT64_MAX to wait indefinitely (well, at least 292 -* years). +* Returns 0 if the wait was successful ie. the last batch referencing the +* object has completed within the allotted time. Otherwise some negative return +* value describes the error. Of particular interest is -ETIME when the wait has +* failed to yield the desired result. * * Similar to drm_intel_gem_bo_wait_rendering except a timeout parameter allows * 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)* not guarantee that the buffer is re-issued via another thread, or an flinked * handle. Userspace must make sure this race does not occur if such precision * is important. +* +* Note that some kernels have broken the inifite wait for negative values +* promise, upgrade to latest stable kernels if this is the case. */ drm_public intdrm_intel_gem_bo_wait (drm_intel_bo *bo,int64_t timeout_ns)
Signature · 6 lines
2.1.4 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 47 lines · Daniel Vetter
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 <[email protected]>Cc Chris Wilson <[email protected]>Reviewed-by Kristian Høgsberg <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- intel/intel_bufmgr_gem.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)intel/intel_bufmgr_gem.c +5
-7@@ -1655,14 +1655,12 @@ drm_intel_gem_bo_wait_rendering(drm_intel_bo *bo)* * @bo: buffer object to wait for * @timeout_ns: amount of time to wait in nanoseconds. -* If value is less than or equal to 0, return immediately. +* If value is less than 0, an infinite wait will occur. * -* Returns 0 if the wait was successful ie. the last batch referencing -* the object has completed within the allotted time. Otherwise some -* negative return value describes the error. Of particular interest -* is -ETIME when the wait has failed to yield the desired result. -* Use a timeout of INT64_MAX to wait indefinitely (well, at least 292 -* years). +* Returns 0 if the wait was successful ie. the last batch referencing the +* object has completed within the allotted time. Otherwise some negative return +* value describes the error. Of particular interest is -ETIME when the wait has +* failed to yield the desired result. * * Similar to drm_intel_gem_bo_wait_rendering except a timeout parameter allows * the operation to give up after a certain amount of time. Another subtle
intel/intel_bufmgr_gem.c drm_intel_gem_bo_wait_rendering(drm_intel_bo *bo) · line 1677
Quoted 5 lines
intel/intel_bufmgr_gem.c +2
-0@@ -1675,6 +1673,9 @@ drm_intel_gem_bo_wait_rendering(drm_intel_bo *bo)* not guarantee that the buffer is re-issued via another thread, or an flinked * handle. Userspace must make sure this race does not occur if such precision * is important. +* +* Note that some kernels have broken the inifite wait for negative values
s/inifite/infinite/, then
intel/intel_bufmgr_gem.c drm_intel_gem_bo_wait_rendering(drm_intel_bo *bo) · line 1681
Quoted 5 lines
intel/intel_bufmgr_gem.c +1
-0+* promise, upgrade to latest stable kernels if this is the case. */ drm_public intdrm_intel_gem_bo_wait (drm_intel_bo *bo,int64_t timeout_ns)
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx