<div dir="ltr"><div>Fine with me.</div><div><br></div><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Aug 22, 2018 at 4:29 AM Daniel Vetter <<a href="mailto:daniel.vetter@ffwll.ch">daniel.vetter@ffwll.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is used for handling future fences. Currently no driver use<br>
these, and I think given the new timeline fence proposed by KHR it<br>
would be better to have a more abstract interface for future fences.<br>
Could be something simple like a struct dma_future_fence plus a<br>
function to add a callback or wait for the fence to materialize.<br>
<br>
Then syncobj (and anything else really) could grow new functions to<br>
expose these two drivers. Normal dma_fence would then keep the nice<br>
guarantee that they will always signal (and through ordering, be<br>
deadlock free). dma_future_fence would then be the tricky one.<br>
<br>
This also fixes sphinx complaining about the kerneldoc.<br>
<br>
Cc: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>><br>
Cc: Dave Airlie <<a href="mailto:airlied@redhat.com" target="_blank">airlied@redhat.com</a>><br>
Cc: Chris Wilson <<a href="mailto:chris@chris-wilson.co.uk" target="_blank">chris@chris-wilson.co.uk</a>><br>
Signed-off-by: Daniel Vetter <<a href="mailto:daniel.vetter@intel.com" target="_blank">daniel.vetter@intel.com</a>><br>
---<br>
 drivers/gpu/drm/drm_syncobj.c | 15 ---------------<br>
 include/drm/drm_syncobj.h     |  5 -----<br>
 2 files changed, 20 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c<br>
index adb3cb27d31e..3a8837c49639 100644<br>
--- a/drivers/gpu/drm/drm_syncobj.c<br>
+++ b/drivers/gpu/drm/drm_syncobj.c<br>
@@ -120,14 +120,6 @@ static int drm_syncobj_fence_get_or_add_callback(struct drm_syncobj *syncobj,<br>
        return ret;<br>
 }<br>
<br>
-/**<br>
- * drm_syncobj_add_callback - adds a callback to syncobj::cb_list<br>
- * @syncobj: Sync object to which to add the callback<br>
- * @cb: Callback to add<br>
- * @func: Func to use when initializing the drm_syncobj_cb struct<br>
- *<br>
- * This adds a callback to be called next time the fence is replaced<br>
- */<br>
 void drm_syncobj_add_callback(struct drm_syncobj *syncobj,<br>
                              struct drm_syncobj_cb *cb,<br>
                              drm_syncobj_func_t func)<br>
@@ -136,13 +128,7 @@ void drm_syncobj_add_callback(struct drm_syncobj *syncobj,<br>
        drm_syncobj_add_callback_locked(syncobj, cb, func);<br>
        spin_unlock(&syncobj->lock);<br>
 }<br>
-EXPORT_SYMBOL(drm_syncobj_add_callback);<br>
<br>
-/**<br>
- * drm_syncobj_add_callback - removes a callback to syncobj::cb_list<br>
- * @syncobj: Sync object from which to remove the callback<br>
- * @cb: Callback to remove<br>
- */<br>
 void drm_syncobj_remove_callback(struct drm_syncobj *syncobj,<br>
                                 struct drm_syncobj_cb *cb)<br>
 {<br>
@@ -150,7 +136,6 @@ void drm_syncobj_remove_callback(struct drm_syncobj *syncobj,<br>
        list_del_init(&cb->node);<br>
        spin_unlock(&syncobj->lock);<br>
 }<br>
-EXPORT_SYMBOL(drm_syncobj_remove_callback);<br>
<br>
 /**<br>
  * drm_syncobj_replace_fence - replace fence in a sync object.<br>
diff --git a/include/drm/drm_syncobj.h b/include/drm/drm_syncobj.h<br>
index 3980602472c0..e419c79ba94d 100644<br>
--- a/include/drm/drm_syncobj.h<br>
+++ b/include/drm/drm_syncobj.h<br>
@@ -131,11 +131,6 @@ drm_syncobj_fence_get(struct drm_syncobj *syncobj)<br>
<br>
 struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private,<br>
                                     u32 handle);<br>
-void drm_syncobj_add_callback(struct drm_syncobj *syncobj,<br>
-                             struct drm_syncobj_cb *cb,<br>
-                             drm_syncobj_func_t func);<br>
-void drm_syncobj_remove_callback(struct drm_syncobj *syncobj,<br>
-                                struct drm_syncobj_cb *cb);<br>
 void drm_syncobj_replace_fence(struct drm_syncobj *syncobj,<br>
                               struct dma_fence *fence);<br>
 int drm_syncobj_find_fence(struct drm_file *file_private,<br>
-- <br>
2.18.0<br>
<br>
</blockquote></div>