dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: Jammy Zhou <Jammy.Zhou@amd.com>,
	dri-devel@lists.freedesktop.org, maarten.lankhorst@canonical.com
Cc: alexander.deucher@amd.com
Subject: Re: [PATCH 2/2] dma-buf/fence: don't wait when specified timeout is zero
Date: Wed, 21 Jan 2015 12:09:25 +0100	[thread overview]
Message-ID: <54BF88E5.1070508@amd.com> (raw)
In-Reply-To: <1421836549-4539-2-git-send-email-Jammy.Zhou@amd.com>

Am 21.01.2015 um 11:35 schrieb Jammy Zhou:
> When specified timeout is zero for fence_wait_timeout, just check if the fence
> is signaled or not without wait.
>
> Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/dma-buf/fence.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/dma-buf/fence.c b/drivers/dma-buf/fence.c
> index e554111..50ef8bd 100644
> --- a/drivers/dma-buf/fence.c
> +++ b/drivers/dma-buf/fence.c
> @@ -159,6 +159,9 @@ fence_wait_timeout(struct fence *fence, bool intr, signed long timeout)
>   	if (WARN_ON(timeout < 0))
>   		return -EINVAL;
>   
> +	if (timeout == 0)
> +		return fence_is_signaled(fence);
> +
>   	trace_fence_wait_start(fence);
>   	ret = fence->ops->wait(fence, intr, timeout);
>   	trace_fence_wait_end(fence);

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2015-01-21 11:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-21 10:35 [PATCH 1/2] reservation: wait only with non-zero timeout specified (v3) Jammy Zhou
2015-01-21 10:31 ` Maarten Lankhorst
2015-01-21 16:16   ` Alex Deucher
2015-01-21 17:30     ` Maarten Lankhorst
2015-01-21 17:34       ` Alex Deucher
2015-01-22 10:00         ` Sumit Semwal
2015-01-21 10:35 ` [PATCH 2/2] dma-buf/fence: don't wait when specified timeout is zero Jammy Zhou
2015-01-21 10:31   ` Maarten Lankhorst
2015-01-21 11:09   ` Christian König [this message]

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=54BF88E5.1070508@amd.com \
    --to=christian.koenig@amd.com \
    --cc=Jammy.Zhou@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maarten.lankhorst@canonical.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox