All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma-buf/fence: fix fence_is_later v2
@ 2016-02-29 15:53 Alex Deucher
  2016-02-29 22:13 ` Gustavo Padovan
  2016-03-03 12:43 ` Sumit Semwal
  0 siblings, 2 replies; 10+ messages in thread
From: Alex Deucher @ 2016-02-29 15:53 UTC (permalink / raw)
  To: dri-devel, sumit.semwal, linaro-mm-sig, m.b.lankhorst, gustavo
  Cc: Alex Deucher, Christian König

From: Christian König <christian.koenig@amd.com>

A fence is never later than itself. This caused a bunch of overhead for AMDGPU.

v2: simplify check as suggested by Michel.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 include/linux/fence.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/fence.h b/include/linux/fence.h
index bb52201..5aa95eb 100644
--- a/include/linux/fence.h
+++ b/include/linux/fence.h
@@ -292,7 +292,7 @@ static inline bool fence_is_later(struct fence *f1, struct fence *f2)
 	if (WARN_ON(f1->context != f2->context))
 		return false;
 
-	return f1->seqno - f2->seqno < INT_MAX;
+	return (int)(f1->seqno - f2->seqno) > 0;
 }
 
 /**
-- 
2.5.0

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] dma-buf/fence: fix fence_is_later v2
  2016-02-29 15:53 [PATCH] dma-buf/fence: fix fence_is_later v2 Alex Deucher
@ 2016-02-29 22:13 ` Gustavo Padovan
  2016-03-01  8:36   ` Maarten Lankhorst
  2016-03-03 12:43 ` Sumit Semwal
  1 sibling, 1 reply; 10+ messages in thread
From: Gustavo Padovan @ 2016-02-29 22:13 UTC (permalink / raw)
  To: Alex Deucher
  Cc: m.b.lankhorst, dri-devel, Christian König, linaro-mm-sig,
	Alex Deucher

2016-02-29 Alex Deucher <alexdeucher@gmail.com>:

> From: Christian König <christian.koenig@amd.com>
> 
> A fence is never later than itself. This caused a bunch of overhead for AMDGPU.
> 
> v2: simplify check as suggested by Michel.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  include/linux/fence.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dma-buf/fence: fix fence_is_later v2
  2016-02-29 22:13 ` Gustavo Padovan
@ 2016-03-01  8:36   ` Maarten Lankhorst
  2016-03-01  8:42     ` Christian König
  0 siblings, 1 reply; 10+ messages in thread
From: Maarten Lankhorst @ 2016-03-01  8:36 UTC (permalink / raw)
  To: Gustavo Padovan, Alex Deucher, dri-devel, sumit.semwal,
	linaro-mm-sig, Christian König, Alex Deucher

Op 29-02-16 om 23:13 schreef Gustavo Padovan:
> 2016-02-29 Alex Deucher <alexdeucher@gmail.com>:
>
>> From: Christian König <christian.koenig@amd.com>
>>
>> A fence is never later than itself. This caused a bunch of overhead for AMDGPU.
>>
>> v2: simplify check as suggested by Michel.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>> ---
>>  include/linux/fence.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> 	Gustavo
Why is it causing overhead? Not really opposed to the patch though.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dma-buf/fence: fix fence_is_later v2
  2016-03-01  8:36   ` Maarten Lankhorst
@ 2016-03-01  8:42     ` Christian König
  0 siblings, 0 replies; 10+ messages in thread
From: Christian König @ 2016-03-01  8:42 UTC (permalink / raw)
  To: Maarten Lankhorst, Gustavo Padovan, Alex Deucher, dri-devel,
	sumit.semwal, linaro-mm-sig, Alex Deucher

Am 01.03.2016 um 09:36 schrieb Maarten Lankhorst:
> Op 29-02-16 om 23:13 schreef Gustavo Padovan:
>> 2016-02-29 Alex Deucher <alexdeucher@gmail.com>:
>>
>>> From: Christian König <christian.koenig@amd.com>
>>>
>>> A fence is never later than itself. This caused a bunch of overhead for AMDGPU.
>>>
>>> v2: simplify check as suggested by Michel.
>>>
>>> Signed-off-by: Christian König <christian.koenig@amd.com>
>>> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
>>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>>> ---
>>>   include/linux/fence.h | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>>
>> 	Gustavo
> Why is it causing overhead? Not really opposed to the patch though.

We tested if flushing the VM is necessary by remembering the last 
flushed VM update operation and comparing that to what operation we need 
to have flushed for the current command submission to work.

So when we where already at the last operation in the timeline we would 
flush anyway which was superfluous.

Regards,
Christian.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dma-buf/fence: fix fence_is_later v2
  2016-02-29 15:53 [PATCH] dma-buf/fence: fix fence_is_later v2 Alex Deucher
  2016-02-29 22:13 ` Gustavo Padovan
@ 2016-03-03 12:43 ` Sumit Semwal
  1 sibling, 0 replies; 10+ messages in thread
From: Sumit Semwal @ 2016-03-03 12:43 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Maarten Lankhorst, DRI mailing list, Linaro MM SIG Mailman List,
	Alex Deucher, Christian König

Hi Alex,

On 29 February 2016 at 21:23, Alex Deucher <alexdeucher@gmail.com> wrote:
> From: Christian König <christian.koenig@amd.com>
>
> A fence is never later than itself. This caused a bunch of overhead for AMDGPU.
>

Thanks; added to for-next.

> v2: simplify check as suggested by Michel.
>
Best regards,
~Sumit.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dma-buf/fence: fix fence_is_later v2
  2016-02-29 15:48   ` Daniel Vetter
@ 2016-03-02  3:02     ` Sumit Semwal
  0 siblings, 0 replies; 10+ messages in thread
From: Sumit Semwal @ 2016-03-02  3:02 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Michel Dänzer, DRI mailing list


[-- Attachment #1.1: Type: text/plain, Size: 2464 bytes --]

Hi Daniel,
On 29-Feb-2016 9:18 pm, "Daniel Vetter" <daniel@ffwll.ch> wrote:
>
> On Tue, Feb 23, 2016 at 11:04:57AM +0900, Michel Dänzer wrote:
> > On 23.02.2016 04:32, Alex Deucher wrote:
> > > From: Christian König <christian.koenig@amd.com>
> > >
> > > A fence is never later than itself. This caused a bunch of overhead
for AMDGPU.
> > >
> > > v2: simplify check as suggested by Michel.
> > >
> > > Signed-off-by: Christian König <christian.koenig@amd.com>
> > > Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
> > > Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> > > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > > ---
> > >  include/linux/fence.h | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/include/linux/fence.h b/include/linux/fence.h
> > > index bb52201..5aa95eb 100644
> > > --- a/include/linux/fence.h
> > > +++ b/include/linux/fence.h
> > > @@ -292,7 +292,7 @@ static inline bool fence_is_later(struct fence
*f1, struct fence *f2)
> > >     if (WARN_ON(f1->context != f2->context))
> > >             return false;
> > >
> > > -   return f1->seqno - f2->seqno < INT_MAX;
> > > +   return (int)(f1->seqno - f2->seqno) > 0;
> > >  }
> > >
> > >  /**
> > >
> >
> > According to
> >
> >  scripts/get_maintainer.pl include/linux/fence.h
> >
> > this patch should be sent to:
> >
> > Sumit Semwal <sumit.semwal@linaro.org> (maintainer:DMA BUFFER SHARING
FRAMEWORK)
> > linux-media@vger.kernel.org (open list:DMA BUFFER SHARING FRAMEWORK)
> > dri-devel@lists.freedesktop.org (open list:DMA BUFFER SHARING FRAMEWORK)
> > linaro-mm-sig@lists.linaro.org (moderated list:DMA BUFFER SHARING
FRAMEWORK)
> > linux-kernel@vger.kernel.org (open list)
> >
> > I'd add at least Sumit and the linaro-mm-sig list.
>
> Plus Maarten Lankhorst please, and Gustavo Padovan maybe. Not sure Sumit
> is still all that active on dma-buf/fence maintainership ...
Am here very much, though I do apologize I haven't actively provided review
comments on the fence related series. I'll improve on that for sure!

Yes, it is still a good idea to add Maarten for fence stuff in the least.
> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

[-- Attachment #1.2: Type: text/html, Size: 3940 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH] dma-buf/fence: fix fence_is_later v2
  2016-02-23  2:04 ` Michel Dänzer
@ 2016-02-29 15:48   ` Daniel Vetter
  2016-03-02  3:02     ` Sumit Semwal
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Vetter @ 2016-02-29 15:48 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: dri-devel

On Tue, Feb 23, 2016 at 11:04:57AM +0900, Michel Dänzer wrote:
> On 23.02.2016 04:32, Alex Deucher wrote:
> > From: Christian König <christian.koenig@amd.com>
> > 
> > A fence is never later than itself. This caused a bunch of overhead for AMDGPU.
> > 
> > v2: simplify check as suggested by Michel.
> > 
> > Signed-off-by: Christian König <christian.koenig@amd.com>
> > Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
> > Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > ---
> >  include/linux/fence.h | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/include/linux/fence.h b/include/linux/fence.h
> > index bb52201..5aa95eb 100644
> > --- a/include/linux/fence.h
> > +++ b/include/linux/fence.h
> > @@ -292,7 +292,7 @@ static inline bool fence_is_later(struct fence *f1, struct fence *f2)
> >  	if (WARN_ON(f1->context != f2->context))
> >  		return false;
> >  
> > -	return f1->seqno - f2->seqno < INT_MAX;
> > +	return (int)(f1->seqno - f2->seqno) > 0;
> >  }
> >  
> >  /**
> > 
> 
> According to
> 
>  scripts/get_maintainer.pl include/linux/fence.h
> 
> this patch should be sent to:
> 
> Sumit Semwal <sumit.semwal@linaro.org> (maintainer:DMA BUFFER SHARING FRAMEWORK)
> linux-media@vger.kernel.org (open list:DMA BUFFER SHARING FRAMEWORK)
> dri-devel@lists.freedesktop.org (open list:DMA BUFFER SHARING FRAMEWORK)
> linaro-mm-sig@lists.linaro.org (moderated list:DMA BUFFER SHARING FRAMEWORK)
> linux-kernel@vger.kernel.org (open list)
> 
> I'd add at least Sumit and the linaro-mm-sig list.

Plus Maarten Lankhorst please, and Gustavo Padovan maybe. Not sure Sumit
is still all that active on dma-buf/fence maintainership ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] dma-buf/fence: fix fence_is_later v2
@ 2016-02-23  2:21 Alex Deucher
  0 siblings, 0 replies; 10+ messages in thread
From: Alex Deucher @ 2016-02-23  2:21 UTC (permalink / raw)
  To: dri-devel, sumit.semwal, linaro-mm-sig; +Cc: Alex Deucher, Christian König

From: Christian König <christian.koenig@amd.com>

A fence is never later than itself. This caused a bunch of overhead for AMDGPU.

v2: simplify check as suggested by Michel.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 include/linux/fence.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/fence.h b/include/linux/fence.h
index bb52201..5aa95eb 100644
--- a/include/linux/fence.h
+++ b/include/linux/fence.h
@@ -292,7 +292,7 @@ static inline bool fence_is_later(struct fence *f1, struct fence *f2)
 	if (WARN_ON(f1->context != f2->context))
 		return false;
 
-	return f1->seqno - f2->seqno < INT_MAX;
+	return (int)(f1->seqno - f2->seqno) > 0;
 }
 
 /**
-- 
2.5.0

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH] dma-buf/fence: fix fence_is_later v2
  2016-02-22 19:32 Alex Deucher
@ 2016-02-23  2:04 ` Michel Dänzer
  2016-02-29 15:48   ` Daniel Vetter
  0 siblings, 1 reply; 10+ messages in thread
From: Michel Dänzer @ 2016-02-23  2:04 UTC (permalink / raw)
  To: Alex Deucher; +Cc: dri-devel

On 23.02.2016 04:32, Alex Deucher wrote:
> From: Christian König <christian.koenig@amd.com>
> 
> A fence is never later than itself. This caused a bunch of overhead for AMDGPU.
> 
> v2: simplify check as suggested by Michel.
> 
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  include/linux/fence.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/fence.h b/include/linux/fence.h
> index bb52201..5aa95eb 100644
> --- a/include/linux/fence.h
> +++ b/include/linux/fence.h
> @@ -292,7 +292,7 @@ static inline bool fence_is_later(struct fence *f1, struct fence *f2)
>  	if (WARN_ON(f1->context != f2->context))
>  		return false;
>  
> -	return f1->seqno - f2->seqno < INT_MAX;
> +	return (int)(f1->seqno - f2->seqno) > 0;
>  }
>  
>  /**
> 

According to

 scripts/get_maintainer.pl include/linux/fence.h

this patch should be sent to:

Sumit Semwal <sumit.semwal@linaro.org> (maintainer:DMA BUFFER SHARING FRAMEWORK)
linux-media@vger.kernel.org (open list:DMA BUFFER SHARING FRAMEWORK)
dri-devel@lists.freedesktop.org (open list:DMA BUFFER SHARING FRAMEWORK)
linaro-mm-sig@lists.linaro.org (moderated list:DMA BUFFER SHARING FRAMEWORK)
linux-kernel@vger.kernel.org (open list)

I'd add at least Sumit and the linaro-mm-sig list.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH] dma-buf/fence: fix fence_is_later v2
@ 2016-02-22 19:32 Alex Deucher
  2016-02-23  2:04 ` Michel Dänzer
  0 siblings, 1 reply; 10+ messages in thread
From: Alex Deucher @ 2016-02-22 19:32 UTC (permalink / raw)
  To: dri-devel; +Cc: Alex Deucher, Christian König

From: Christian König <christian.koenig@amd.com>

A fence is never later than itself. This caused a bunch of overhead for AMDGPU.

v2: simplify check as suggested by Michel.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 include/linux/fence.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/fence.h b/include/linux/fence.h
index bb52201..5aa95eb 100644
--- a/include/linux/fence.h
+++ b/include/linux/fence.h
@@ -292,7 +292,7 @@ static inline bool fence_is_later(struct fence *f1, struct fence *f2)
 	if (WARN_ON(f1->context != f2->context))
 		return false;
 
-	return f1->seqno - f2->seqno < INT_MAX;
+	return (int)(f1->seqno - f2->seqno) > 0;
 }
 
 /**
-- 
2.5.0

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-03-03 12:43 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-29 15:53 [PATCH] dma-buf/fence: fix fence_is_later v2 Alex Deucher
2016-02-29 22:13 ` Gustavo Padovan
2016-03-01  8:36   ` Maarten Lankhorst
2016-03-01  8:42     ` Christian König
2016-03-03 12:43 ` Sumit Semwal
  -- strict thread matches above, loose matches on Subject: below --
2016-02-23  2:21 Alex Deucher
2016-02-22 19:32 Alex Deucher
2016-02-23  2:04 ` Michel Dänzer
2016-02-29 15:48   ` Daniel Vetter
2016-03-02  3:02     ` Sumit Semwal

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.