dri-devel.lists.freedesktop.org archive mirror
 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
* [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
* [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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).