staging/android: remove not used sync_timeline ops
.dup and .compare are not used by the sync framework, so remove them from sw_sync. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3179dd927a
commit
27e3917ab9
|
@ -25,14 +25,6 @@
|
|||
|
||||
#include "sw_sync.h"
|
||||
|
||||
static int sw_sync_cmp(u32 a, u32 b)
|
||||
{
|
||||
if (a == b)
|
||||
return 0;
|
||||
|
||||
return ((s32)a - (s32)b) < 0 ? -1 : 1;
|
||||
}
|
||||
|
||||
struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)
|
||||
{
|
||||
struct sw_sync_pt *pt;
|
||||
|
@ -46,30 +38,13 @@ struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)
|
|||
}
|
||||
EXPORT_SYMBOL(sw_sync_pt_create);
|
||||
|
||||
static struct sync_pt *sw_sync_pt_dup(struct sync_pt *sync_pt)
|
||||
{
|
||||
struct sw_sync_pt *pt = (struct sw_sync_pt *)sync_pt;
|
||||
struct sw_sync_timeline *obj =
|
||||
(struct sw_sync_timeline *)sync_pt_parent(sync_pt);
|
||||
|
||||
return (struct sync_pt *)sw_sync_pt_create(obj, pt->value);
|
||||
}
|
||||
|
||||
static int sw_sync_pt_has_signaled(struct sync_pt *sync_pt)
|
||||
{
|
||||
struct sw_sync_pt *pt = (struct sw_sync_pt *)sync_pt;
|
||||
struct sw_sync_timeline *obj =
|
||||
(struct sw_sync_timeline *)sync_pt_parent(sync_pt);
|
||||
|
||||
return sw_sync_cmp(obj->value, pt->value) >= 0;
|
||||
}
|
||||
|
||||
static int sw_sync_pt_compare(struct sync_pt *a, struct sync_pt *b)
|
||||
{
|
||||
struct sw_sync_pt *pt_a = (struct sw_sync_pt *)a;
|
||||
struct sw_sync_pt *pt_b = (struct sw_sync_pt *)b;
|
||||
|
||||
return sw_sync_cmp(pt_a->value, pt_b->value);
|
||||
return (pt->value > obj->value) ? 0 : 1;
|
||||
}
|
||||
|
||||
static int sw_sync_fill_driver_data(struct sync_pt *sync_pt,
|
||||
|
@ -103,9 +78,7 @@ static void sw_sync_pt_value_str(struct sync_pt *sync_pt,
|
|||
|
||||
static struct sync_timeline_ops sw_sync_timeline_ops = {
|
||||
.driver_name = "sw_sync",
|
||||
.dup = sw_sync_pt_dup,
|
||||
.has_signaled = sw_sync_pt_has_signaled,
|
||||
.compare = sw_sync_pt_compare,
|
||||
.fill_driver_data = sw_sync_fill_driver_data,
|
||||
.timeline_value_str = sw_sync_timeline_value_str,
|
||||
.pt_value_str = sw_sync_pt_value_str,
|
||||
|
|
|
@ -68,9 +68,6 @@ static void sync_timeline_free(struct kref *kref)
|
|||
|
||||
sync_timeline_debug_remove(obj);
|
||||
|
||||
if (obj->ops->release_obj)
|
||||
obj->ops->release_obj(obj);
|
||||
|
||||
kfree(obj);
|
||||
}
|
||||
|
||||
|
@ -383,9 +380,6 @@ static void android_fence_release(struct fence *fence)
|
|||
list_del(&pt->active_list);
|
||||
spin_unlock_irqrestore(fence->lock, flags);
|
||||
|
||||
if (parent->ops->free_pt)
|
||||
parent->ops->free_pt(pt);
|
||||
|
||||
sync_timeline_put(parent);
|
||||
fence_free(&pt->base);
|
||||
}
|
||||
|
|
|
@ -30,17 +30,10 @@ struct sync_fence;
|
|||
/**
|
||||
* struct sync_timeline_ops - sync object implementation ops
|
||||
* @driver_name: name of the implementation
|
||||
* @dup: duplicate a sync_pt
|
||||
* @has_signaled: returns:
|
||||
* 1 if pt has signaled
|
||||
* 0 if pt has not signaled
|
||||
* <0 on error
|
||||
* @compare: returns:
|
||||
* 1 if b will signal before a
|
||||
* 0 if a and b will signal at the same time
|
||||
* -1 if a will signal before b
|
||||
* @free_pt: called before sync_pt is freed
|
||||
* @release_obj: called before sync_timeline is freed
|
||||
* @fill_driver_data: write implementation specific driver data to data.
|
||||
* should return an error if there is not enough room
|
||||
* as specified by size. This information is returned
|
||||
|
@ -51,21 +44,9 @@ struct sync_fence;
|
|||
struct sync_timeline_ops {
|
||||
const char *driver_name;
|
||||
|
||||
/* required */
|
||||
struct sync_pt * (*dup)(struct sync_pt *pt);
|
||||
|
||||
/* required */
|
||||
int (*has_signaled)(struct sync_pt *pt);
|
||||
|
||||
/* required */
|
||||
int (*compare)(struct sync_pt *a, struct sync_pt *b);
|
||||
|
||||
/* optional */
|
||||
void (*free_pt)(struct sync_pt *sync_pt);
|
||||
|
||||
/* optional */
|
||||
void (*release_obj)(struct sync_timeline *sync_timeline);
|
||||
|
||||
/* optional */
|
||||
int (*fill_driver_data)(struct sync_pt *syncpt, void *data, int size);
|
||||
|
||||
|
|
Loading…
Reference in New Issue