[PATCH 7/7] drm/syncobj: use the timeline point in drm_syncobj_find_fence
Christian König
ckoenig.leichtzumerken at gmail.com
Thu Nov 15 11:12:45 UTC 2018
Implement finding the right timeline point in drm_syncobj_find_fence.
Signed-off-by: Christian König <christian.koenig at amd.com>
---
drivers/gpu/drm/drm_syncobj.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 589d884ccd58..d42c51520da4 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -307,9 +307,17 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
return -ENOENT;
*fence = drm_syncobj_fence_get(syncobj);
- if (!*fence) {
+ if (!*fence)
ret = -EINVAL;
+
+ if (!ret && point) {
+ dma_fence_chain_for_each(*fence) {
+ if (!to_dma_fence_chain(*fence) ||
+ (*fence)->seqno <= point)
+ break;
+ }
}
+
drm_syncobj_put(syncobj);
return ret;
}
--
2.14.1
More information about the dri-devel
mailing list