All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Gordon <david.s.gordon@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] Revert "intel: Fix documentation for drm_intel_gem_bo_wait()"
Date: Fri, 06 Mar 2015 18:19:41 +0000	[thread overview]
Message-ID: <54F9EFBD.803@intel.com> (raw)
In-Reply-To: <1425664715-29548-1-git-send-email-daniel.vetter@ffwll.ch>

On 06/03/15 17:58, Daniel Vetter wrote:
> 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>
> ---
>  intel/intel_bufmgr_gem.c | 15 ++++++++-------
>  1 file changed, 8 insertions(+), 7 deletions(-)
> 
> diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
> index 33d8fbc46242..acbfd4ada209 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)
>   *
>   * @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

s/inifite/infinite/, then

Reviewed-by: Dave Gordon <david.s.gordon@intel.com>

> + * promise, upgrade to latest stable kernels if this is the case.
>   */
>  drm_public int
>  drm_intel_gem_bo_wait(drm_intel_bo *bo, int64_t timeout_ns)
> 

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-03-06 18:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-06 17:58 [PATCH] Revert "intel: Fix documentation for drm_intel_gem_bo_wait()" Daniel Vetter
2015-03-06 18:19 ` Dave Gordon [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-03-06 17:56 Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54F9EFBD.803@intel.com \
    --to=david.s.gordon@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.