dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhou, Jammy" <Jammy.Zhou@amd.com>
To: Maarten Lankhorst <maarten.lankhorst@canonical.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Koenig, Christian" <Christian.Koenig@amd.com>
Subject: RE: [PATCH] reservation: wait only with non-zero timeout specified (v3)
Date: Tue, 13 Jan 2015 09:19:19 +0000	[thread overview]
Message-ID: <FD5696F5CDD4B04D92C97DB96167DECA1601075D@SCYBEXDAG04.amd.com> (raw)
In-Reply-To: <54B4DF8C.4040001@canonical.com>

> but where do you need this?
With the new upcoming amdgpu driver, we would like to use 'timeout==0' to check if the fences are signaled or not (without waiting). 

Besides, the jiffies accuracy is not enough for UMDs if the specified timeout is nsecs or usecs, and then nsecs_to_jiffies/usecs_to_jiffies may return zero. So the 'timeout==0' case is easy to be hit for reservation_object_wait_timeout_rcu.

Regards,
Jammy

-----Original Message-----
From: Maarten Lankhorst [mailto:maarten.lankhorst@canonical.com] 
Sent: Tuesday, January 13, 2015 5:04 PM
To: Zhou, Jammy; dri-devel@lists.freedesktop.org
Cc: Deucher, Alexander; Koenig, Christian
Subject: Re: [PATCH] reservation: wait only with non-zero timeout specified (v3)

Op 13-01-15 om 10:36 schreef Jammy Zhou:
> When the timeout value passed to reservation_object_wait_timeout_rcu
> is zero, no wait should be done if the fences are not signaled.
>
> Return '1' for idle and '0' for busy if the specified timeout is '0'
> to keep consistent with the case of non-zero timeout.
>
> v2: call fence_put if not signaled in the case of timeout==0
>
>
Looks more sane, but where do you need this?

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

  reply	other threads:[~2015-01-13  9:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13  9:36 [PATCH] reservation: wait only with non-zero timeout specified (v3) Jammy Zhou
2015-01-13  9:04 ` Maarten Lankhorst
2015-01-13  9:19   ` Zhou, Jammy [this message]
2015-01-13  9:22   ` Christian König
2015-01-13 10:18     ` Maarten Lankhorst
2015-01-13 22:10       ` Daniel Vetter
2015-01-14  2:16         ` Zhou, Jammy
2015-01-21  9:12           ` Maarten Lankhorst
2015-01-21  9:35             ` Zhou, Jammy

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=FD5696F5CDD4B04D92C97DB96167DECA1601075D@SCYBEXDAG04.amd.com \
    --to=jammy.zhou@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Christian.Koenig@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