aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <[email protected]>2016-02-29 10:53:11 -0500
committerDaniel Vetter <[email protected]>2016-03-21 09:26:50 +0100
commitb47bcb93bbf201e9c5af698945755efeb60c0bc8 (patch)
tree896718f2139a30d5b0bcfbf1d185e1fd474c0bd1
parent87e332d56b2c7dc6733f690c9069f4fe75f21c9d (diff)
dma-buf/fence: fix fence_is_later v2
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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Gustavo Padovan <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
-rw-r--r--include/linux/fence.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fence.h b/include/linux/fence.h
index bb522011383b..5aa95eb886f7 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;
}
/**