Skip to content

Commit e296de9

Browse files
committed
drm/syncobj: Drop add/remove_callback from driver interface
This is used for handling future fences. Currently no driver use these, and I think given the new timeline fence proposed by KHR it would be better to have a more abstract interface for future fences. Could be something simple like a struct dma_future_fence plus a function to add a callback or wait for the fence to materialize. Then syncobj (and anything else really) could grow new functions to expose these two drivers. Normal dma_fence would then keep the nice guarantee that they will always signal (and through ordering, be deadlock free). dma_future_fence would then be the tricky one. This also fixes sphinx complaining about the kerneldoc. Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: Dave Airlie <airlied@redhat.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180822092905.19884-1-daniel.vetter@ffwll.ch
1 parent ad1a56f commit e296de9

2 files changed

Lines changed: 0 additions & 20 deletions

File tree

‎drivers/gpu/drm/drm_syncobj.c‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,6 @@ static int drm_syncobj_fence_get_or_add_callback(struct drm_syncobj *syncobj,
120120
return ret;
121121
}
122122

123-
/**
124-
* drm_syncobj_add_callback - adds a callback to syncobj::cb_list
125-
* @syncobj: Sync object to which to add the callback
126-
* @cb: Callback to add
127-
* @func: Func to use when initializing the drm_syncobj_cb struct
128-
*
129-
* This adds a callback to be called next time the fence is replaced
130-
*/
131123
void drm_syncobj_add_callback(struct drm_syncobj *syncobj,
132124
struct drm_syncobj_cb *cb,
133125
drm_syncobj_func_t func)
@@ -136,21 +128,14 @@ void drm_syncobj_add_callback(struct drm_syncobj *syncobj,
136128
drm_syncobj_add_callback_locked(syncobj, cb, func);
137129
spin_unlock(&syncobj->lock);
138130
}
139-
EXPORT_SYMBOL(drm_syncobj_add_callback);
140131

141-
/**
142-
* drm_syncobj_add_callback - removes a callback to syncobj::cb_list
143-
* @syncobj: Sync object from which to remove the callback
144-
* @cb: Callback to remove
145-
*/
146132
void drm_syncobj_remove_callback(struct drm_syncobj *syncobj,
147133
struct drm_syncobj_cb *cb)
148134
{
149135
spin_lock(&syncobj->lock);
150136
list_del_init(&cb->node);
151137
spin_unlock(&syncobj->lock);
152138
}
153-
EXPORT_SYMBOL(drm_syncobj_remove_callback);
154139

155140
/**
156141
* drm_syncobj_replace_fence - replace fence in a sync object.

‎include/drm/drm_syncobj.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,6 @@ drm_syncobj_fence_get(struct drm_syncobj *syncobj)
131131

132132
struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private,
133133
u32 handle);
134-
void drm_syncobj_add_callback(struct drm_syncobj *syncobj,
135-
struct drm_syncobj_cb *cb,
136-
drm_syncobj_func_t func);
137-
void drm_syncobj_remove_callback(struct drm_syncobj *syncobj,
138-
struct drm_syncobj_cb *cb);
139134
void drm_syncobj_replace_fence(struct drm_syncobj *syncobj,
140135
struct dma_fence *fence);
141136
int drm_syncobj_find_fence(struct drm_file *file_private,

0 commit comments

Comments
 (0)