staging/android: remove driver_data from struct sync_fence_info
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Wed, 3 Feb 2016 13:25:33 +0000 (11:25 -0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 01:34:58 +0000 (17:34 -0800)
It is unclear in what situations driver_data should be used thus better do
not upstream it for now. If a need arises in the future a discussion can
be started to re-add it.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/android/sw_sync.c
drivers/staging/android/sync.c
drivers/staging/android/sync.h
drivers/staging/android/uapi/sync.h

index 3bee959b41d8989ad479b51ad4d5f28d14be1e16..af39ff58fa33134ad17b2a19294a30d0615bbe26 100644 (file)
@@ -47,19 +47,6 @@ static int sw_sync_fence_has_signaled(struct fence *fence)
        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)
 {
@@ -78,7 +65,6 @@ static void sw_sync_fence_value_str(struct fence *fence, 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,
 };
index 85a0e87b9119c00fab37b52863c54ebe49467ab7..d527878c74889028d26f70dd3502732c510ea91f 100644 (file)
@@ -351,16 +351,6 @@ static bool android_fence_enable_signaling(struct fence *fence)
        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)
 {
@@ -394,7 +384,6 @@ static const struct fence_ops android_fence_ops = {
        .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,
 };
@@ -493,22 +482,12 @@ err_put_fd:
 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),
index af1af998949c33d26555334f271e3d8414f37163..d2a173433a7d02008cb5875d19c5ab36deb73065 100644 (file)
@@ -32,10 +32,6 @@ struct sync_file;
  *                       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
  */
@@ -45,9 +41,6 @@ struct sync_timeline_ops {
        /* 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);
index fcc0b3c5b6dad8913a0d30efd8dc9f84f1e20d79..4d8cf0062f04ec32567d78c9bf66f20661ab7b9b 100644 (file)
@@ -28,12 +28,11 @@ struct sync_merge_data {
 
 /**
  * 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;
@@ -41,8 +40,6 @@ struct sync_fence_info {
        char    driver_name[32];
        __s32   status;
        __u64   timestamp_ns;
-
-       __u8    driver_data[0];
 };
 
 /**