Commit 27e3917a authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Greg Kroah-Hartman

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: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3179dd92
...@@ -25,14 +25,6 @@ ...@@ -25,14 +25,6 @@
#include "sw_sync.h" #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 sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)
{ {
struct sw_sync_pt *pt; struct sw_sync_pt *pt;
...@@ -46,30 +38,13 @@ struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value) ...@@ -46,30 +38,13 @@ struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)
} }
EXPORT_SYMBOL(sw_sync_pt_create); 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) 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_pt *pt = (struct sw_sync_pt *)sync_pt;
struct sw_sync_timeline *obj = struct sw_sync_timeline *obj =
(struct sw_sync_timeline *)sync_pt_parent(sync_pt); (struct sw_sync_timeline *)sync_pt_parent(sync_pt);
return sw_sync_cmp(obj->value, pt->value) >= 0; return (pt->value > obj->value) ? 0 : 1;
}
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);
} }
static int sw_sync_fill_driver_data(struct sync_pt *sync_pt, 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, ...@@ -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 = { static struct sync_timeline_ops sw_sync_timeline_ops = {
.driver_name = "sw_sync", .driver_name = "sw_sync",
.dup = sw_sync_pt_dup,
.has_signaled = sw_sync_pt_has_signaled, .has_signaled = sw_sync_pt_has_signaled,
.compare = sw_sync_pt_compare,
.fill_driver_data = sw_sync_fill_driver_data, .fill_driver_data = sw_sync_fill_driver_data,
.timeline_value_str = sw_sync_timeline_value_str, .timeline_value_str = sw_sync_timeline_value_str,
.pt_value_str = sw_sync_pt_value_str, .pt_value_str = sw_sync_pt_value_str,
......
...@@ -68,9 +68,6 @@ static void sync_timeline_free(struct kref *kref) ...@@ -68,9 +68,6 @@ static void sync_timeline_free(struct kref *kref)
sync_timeline_debug_remove(obj); sync_timeline_debug_remove(obj);
if (obj->ops->release_obj)
obj->ops->release_obj(obj);
kfree(obj); kfree(obj);
} }
...@@ -383,9 +380,6 @@ static void android_fence_release(struct fence *fence) ...@@ -383,9 +380,6 @@ static void android_fence_release(struct fence *fence)
list_del(&pt->active_list); list_del(&pt->active_list);
spin_unlock_irqrestore(fence->lock, flags); spin_unlock_irqrestore(fence->lock, flags);
if (parent->ops->free_pt)
parent->ops->free_pt(pt);
sync_timeline_put(parent); sync_timeline_put(parent);
fence_free(&pt->base); fence_free(&pt->base);
} }
......
...@@ -30,17 +30,10 @@ struct sync_fence; ...@@ -30,17 +30,10 @@ struct sync_fence;
/** /**
* struct sync_timeline_ops - sync object implementation ops * struct sync_timeline_ops - sync object implementation ops
* @driver_name: name of the implementation * @driver_name: name of the implementation
* @dup: duplicate a sync_pt
* @has_signaled: returns: * @has_signaled: returns:
* 1 if pt has signaled * 1 if pt has signaled
* 0 if pt has not signaled * 0 if pt has not signaled
* <0 on error * <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. * @fill_driver_data: write implementation specific driver data to data.
* should return an error if there is not enough room * should return an error if there is not enough room
* as specified by size. This information is returned * as specified by size. This information is returned
...@@ -51,21 +44,9 @@ struct sync_fence; ...@@ -51,21 +44,9 @@ struct sync_fence;
struct sync_timeline_ops { struct sync_timeline_ops {
const char *driver_name; const char *driver_name;
/* required */
struct sync_pt * (*dup)(struct sync_pt *pt);
/* required */ /* required */
int (*has_signaled)(struct sync_pt *pt); 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 */ /* optional */
int (*fill_driver_data)(struct sync_pt *syncpt, void *data, int size); int (*fill_driver_data)(struct sync_pt *syncpt, void *data, int size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment