return (pt->value > obj->value) ? 0 : 1;
}
-static int sw_sync_fill_driver_data(struct fence *fence,
- void *data, int size)
-{
- struct sw_sync_pt *pt = (struct sw_sync_pt *)fence;
-
- if (size < sizeof(pt->value))
- return -ENOMEM;
-
- memcpy(data, &pt->value, sizeof(pt->value));
-
- return sizeof(pt->value);
-}
-
static void sw_sync_timeline_value_str(struct sync_timeline *sync_timeline,
char *str, int size)
{
static struct sync_timeline_ops sw_sync_timeline_ops = {
.driver_name = "sw_sync",
.has_signaled = sw_sync_fence_has_signaled,
- .fill_driver_data = sw_sync_fill_driver_data,
.timeline_value_str = sw_sync_timeline_value_str,
.fence_value_str = sw_sync_fence_value_str,
};
return true;
}
-static int android_fence_fill_driver_data(struct fence *fence,
- void *data, int size)
-{
- struct sync_timeline *parent = fence_parent(fence);
-
- if (!parent->ops->fill_driver_data)
- return 0;
- return parent->ops->fill_driver_data(fence, data, size);
-}
-
static void android_fence_value_str(struct fence *fence,
char *str, int size)
{
.signaled = android_fence_signaled,
.wait = fence_default_wait,
.release = android_fence_release,
- .fill_driver_data = android_fence_fill_driver_data,
.fence_value_str = android_fence_value_str,
.timeline_value_str = android_fence_timeline_value_str,
};
static int sync_fill_fence_info(struct fence *fence, void *data, int size)
{
struct sync_fence_info *info = data;
- int ret;
if (size < sizeof(*info))
return -ENOMEM;
info->len = sizeof(*info);
- if (fence->ops->fill_driver_data) {
- ret = fence->ops->fill_driver_data(fence, info->driver_data,
- size - sizeof(*info));
- if (ret < 0)
- return ret;
-
- info->len += ret;
- }
-
strlcpy(info->obj_name, fence->ops->get_timeline_name(fence),
sizeof(info->obj_name));
strlcpy(info->driver_name, fence->ops->get_driver_name(fence),
* 1 if pt has signaled
* 0 if pt has not signaled
* <0 on error
- * @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
- * to userspace by SYNC_IOC_FENCE_INFO.
* @timeline_value_str: fill str with the value of the sync_timeline's counter
* @fence_value_str: fill str with the value of the fence
*/
/* required */
int (*has_signaled)(struct fence *fence);
- /* optional */
- int (*fill_driver_data)(struct fence *fence, void *data, int size);
-
/* optional */
void (*timeline_value_str)(struct sync_timeline *timeline, char *str,
int size);
/**
* struct sync_fence_info - detailed fence information
- * @len: length of sync_fence_info including any driver_data
+ * @len: length of sync_fence_info
* @obj_name: name of parent sync_timeline
* @driver_name: name of driver implementing the parent
* @status: status of the fence 0:active 1:signaled <0:error
* @timestamp_ns: timestamp of status change in nanoseconds
- * @driver_data: any driver dependent data
*/
struct sync_fence_info {
__u32 len;
char driver_name[32];
__s32 status;
__u64 timestamp_ns;
-
- __u8 driver_data[0];
};
/**