* [PATCH 1/2] reservation: wait only with non-zero timeout specified (v3)
@ 2015-01-21 10:35 Jammy Zhou
2015-01-21 10:31 ` Maarten Lankhorst
2015-01-21 10:35 ` [PATCH 2/2] dma-buf/fence: don't wait when specified timeout is zero Jammy Zhou
0 siblings, 2 replies; 9+ messages in thread
From: Jammy Zhou @ 2015-01-21 10:35 UTC (permalink / raw)
To: dri-devel, maarten.lankhorst; +Cc: alexander.deucher, christian.koenig
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
v3: switch to reservation_object_test_signaled_rcu
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/dma-buf/reservation.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c
index 3c97c8f..807ef15 100644
--- a/drivers/dma-buf/reservation.c
+++ b/drivers/dma-buf/reservation.c
@@ -327,6 +327,9 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj,
unsigned seq, shared_count, i = 0;
long ret = timeout;
+ if (!timeout)
+ return reservation_object_test_signaled_rcu(obj, wait_all);
+
retry:
fence = NULL;
shared_count = 0;
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] reservation: wait only with non-zero timeout specified (v3)
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 10:35 ` [PATCH 2/2] dma-buf/fence: don't wait when specified timeout is zero Jammy Zhou
1 sibling, 1 reply; 9+ messages in thread
From: Maarten Lankhorst @ 2015-01-21 10:31 UTC (permalink / raw)
To: Jammy Zhou, dri-devel; +Cc: alexander.deucher, christian.koenig
Op 21-01-15 om 11:35 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
>
> v3: switch to reservation_object_test_signaled_rcu
>
> Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
> Reviewed-by: Christian König <christian.koenig@amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>
Reviewed-By: Maarten Lankhorst <maarten.lankhorst@canonical.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] reservation: wait only with non-zero timeout specified (v3)
2015-01-21 10:31 ` Maarten Lankhorst
@ 2015-01-21 16:16 ` Alex Deucher
2015-01-21 17:30 ` Maarten Lankhorst
0 siblings, 1 reply; 9+ messages in thread
From: Alex Deucher @ 2015-01-21 16:16 UTC (permalink / raw)
To: Maarten Lankhorst, Dave Airlie
Cc: Deucher, Alexander, Christian Koenig,
Maling list - DRI developers
On Wed, Jan 21, 2015 at 5:31 AM, Maarten Lankhorst
<maarten.lankhorst@canonical.com> wrote:
> Op 21-01-15 om 11:35 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
>>
>> v3: switch to reservation_object_test_signaled_rcu
>>
>> Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
>> Reviewed-by: Christian König <christian.koenig@amd.com>
>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>>
> Reviewed-By: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Dave, Maarten,
Do you want to pick these up, or would you rather I pulled them through my tree?
Thanks,
Alex
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] reservation: wait only with non-zero timeout specified (v3)
2015-01-21 16:16 ` Alex Deucher
@ 2015-01-21 17:30 ` Maarten Lankhorst
2015-01-21 17:34 ` Alex Deucher
0 siblings, 1 reply; 9+ messages in thread
From: Maarten Lankhorst @ 2015-01-21 17:30 UTC (permalink / raw)
To: Alex Deucher, Dave Airlie
Cc: Deucher, Alexander, Christian Koenig,
Maling list - DRI developers
Hey,
On 21-01-15 17:16, Alex Deucher wrote:
> On Wed, Jan 21, 2015 at 5:31 AM, Maarten Lankhorst
> <maarten.lankhorst@canonical.com> wrote:
>> Op 21-01-15 om 11:35 schreef Jammy Zhou:
>>> When the timeout value passed to reservation_object_wait_timeout_rcuy,
>>> 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
>>>
>>> v3: switch to reservation_object_test_signaled_rcu
>>>
>>> Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
>>> Reviewed-by: Christian König <christian.koenig@amd.com>
>>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>>>
>> Reviewed-By: Maarten Lankhorst <maarten.lankhorst@canonical.com>
>
> Dave, Maarten,
>
> Do you want to pick these up, or would you rather I pulled them through my tree?
This goes through Sumit Semwal's tree. He's the dma-buf maintainer and I already made him aware of the patches.
~Maarten
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] reservation: wait only with non-zero timeout specified (v3)
2015-01-21 17:30 ` Maarten Lankhorst
@ 2015-01-21 17:34 ` Alex Deucher
2015-01-22 10:00 ` Sumit Semwal
0 siblings, 1 reply; 9+ messages in thread
From: Alex Deucher @ 2015-01-21 17:34 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: Maling list - DRI developers, Christian Koenig,
Deucher, Alexander
On Wed, Jan 21, 2015 at 12:30 PM, Maarten Lankhorst
<maarten.lankhorst@canonical.com> wrote:
> Hey,
>
> On 21-01-15 17:16, Alex Deucher wrote:
>> On Wed, Jan 21, 2015 at 5:31 AM, Maarten Lankhorst
>> <maarten.lankhorst@canonical.com> wrote:
>>> Op 21-01-15 om 11:35 schreef Jammy Zhou:
>>>> When the timeout value passed to reservation_object_wait_timeout_rcuy,
>>>> 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
>>>>
>>>> v3: switch to reservation_object_test_signaled_rcu
>>>>
>>>> Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
>>>> Reviewed-by: Christian König <christian.koenig@amd.com>
>>>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>>>>
>>> Reviewed-By: Maarten Lankhorst <maarten.lankhorst@canonical.com>
>>
>> Dave, Maarten,
>>
>> Do you want to pick these up, or would you rather I pulled them through my tree?
> This goes through Sumit Semwal's tree. He's the dma-buf maintainer and I already made him aware of the patches.
Thanks!
Alex
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] reservation: wait only with non-zero timeout specified (v3)
2015-01-21 17:34 ` Alex Deucher
@ 2015-01-22 10:00 ` Sumit Semwal
0 siblings, 0 replies; 9+ messages in thread
From: Sumit Semwal @ 2015-01-22 10:00 UTC (permalink / raw)
To: Alex Deucher
Cc: Maling list - DRI developers, Deucher, Alexander,
Christian Koenig
Hi Jammy, All,
On 21 January 2015 at 23:04, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Wed, Jan 21, 2015 at 12:30 PM, Maarten Lankhorst
> <maarten.lankhorst@canonical.com> wrote:
>> Hey,
>>
>> On 21-01-15 17:16, Alex Deucher wrote:
>>> On Wed, Jan 21, 2015 at 5:31 AM, Maarten Lankhorst
>>> <maarten.lankhorst@canonical.com> wrote:
>>>> Op 21-01-15 om 11:35 schreef Jammy Zhou:
>>>>> When the timeout value passed to reservation_object_wait_timeout_rcuy,
>>>>> 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
>>>>>
>>>>> v3: switch to reservation_object_test_signaled_rcu
>>>>>
>>>>> Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
>>>>> Reviewed-by: Christian König <christian.koenig@amd.com>
>>>>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>>>>>
>>>> Reviewed-By: Maarten Lankhorst <maarten.lankhorst@canonical.com>
>>>
>>> Dave, Maarten,
>>>
>>> Do you want to pick these up, or would you rather I pulled them through my tree?
>> This goes through Sumit Semwal's tree. He's the dma-buf maintainer and I already made him aware of the patches.
>
Both these patches are now pulled and pushed out to my for-next branch.
>
> Thanks!
>
> Alex
--
Thanks and Best regards,
Sumit.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/2] dma-buf/fence: don't wait when specified timeout is zero
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 10:35 ` Jammy Zhou
2015-01-21 10:31 ` Maarten Lankhorst
2015-01-21 11:09 ` Christian König
1 sibling, 2 replies; 9+ messages in thread
From: Jammy Zhou @ 2015-01-21 10:35 UTC (permalink / raw)
To: dri-devel, maarten.lankhorst; +Cc: alexander.deucher, christian.koenig
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>
---
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);
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] dma-buf/fence: don't wait when specified timeout is zero
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
1 sibling, 0 replies; 9+ messages in thread
From: Maarten Lankhorst @ 2015-01-21 10:31 UTC (permalink / raw)
To: Jammy Zhou, dri-devel; +Cc: alexander.deucher, christian.koenig
Op 21-01-15 om 11:35 schreef 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: Maarten Lankhorst <maarten.lankhorst@canonical.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 2/2] dma-buf/fence: don't wait when specified timeout is zero
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
1 sibling, 0 replies; 9+ messages in thread
From: Christian König @ 2015-01-21 11:09 UTC (permalink / raw)
To: Jammy Zhou, dri-devel, maarten.lankhorst; +Cc: alexander.deucher
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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-01-22 10:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.