All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/11] android sync framework: clean up IOCTLs and ABI
@ 2016-02-02 13:23 ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

Hi,

This patch series clean up IOCTLs and abi of sync framework and it is a follow
up on the clean up series I've sent on Jan 21:

http://thread.gmane.org/gmane.comp.video.dri.devel/145509

The main changes here are:

* remove of SYNC_WAIT ioctl, poll() should be used instead.
* rename some structs and macros to better reflect the new internal names.
* clean up and improve ABI on SYNC_IOC_FILE_INFO
* add flags filed to all ABI structs
* make sync_file_info->len return only the size of the array of fence_infos

v2:
	- Check flags passed to the kernel (Maarten)
	- Rework len to report only the size of fence_infos array (Emil)
	- Fix fence_info type. Use __u64 pointer type (Emil, Maarten)

Please review! Thanks.

Gustavo Padovan (11):
  staging/android: remove SYNC_WAIT ioctl
  staging/android: rename sync_pt_info to fence_info
  staging/android: rename sync_file_info_data to sync_file_info
  staging/android: remove driver_data from struct fence_info
  staging/android: remove len field from struct fence_info
  staging/android: turn fence_info into a __u64 pointer
  staging/android: add num_fences field to struct sync_file_info
  staging/android: make info->len return only the size of fence_infos
  staging/android: rename SYNC_IOC_FENCE_INFO
  staging/android: add flags member to sync ioctl structs
  staging/android: remove redundant comments on sync_merge_data

 drivers/staging/android/sw_sync.c    |  14 ----
 drivers/staging/android/sync.c       | 128 +++++++++--------------------------
 drivers/staging/android/sync.h       |  20 ------
 drivers/staging/android/trace/sync.h |  44 ------------
 drivers/staging/android/uapi/sync.h  |  50 ++++++--------
 5 files changed, 55 insertions(+), 201 deletions(-)

-- 
2.5.0

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v2 00/11] android sync framework: clean up IOCTLs and ABI
@ 2016-02-02 13:23 ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Daniel Stone, Daniel Vetter, Riley Andrews, dri-devel,
	linux-kernel, Arve Hjønnevåg, Gustavo Padovan,
	John Harrison

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

Hi,

This patch series clean up IOCTLs and abi of sync framework and it is a follow
up on the clean up series I've sent on Jan 21:

http://thread.gmane.org/gmane.comp.video.dri.devel/145509

The main changes here are:

* remove of SYNC_WAIT ioctl, poll() should be used instead.
* rename some structs and macros to better reflect the new internal names.
* clean up and improve ABI on SYNC_IOC_FILE_INFO
* add flags filed to all ABI structs
* make sync_file_info->len return only the size of the array of fence_infos

v2:
	- Check flags passed to the kernel (Maarten)
	- Rework len to report only the size of fence_infos array (Emil)
	- Fix fence_info type. Use __u64 pointer type (Emil, Maarten)

Please review! Thanks.

Gustavo Padovan (11):
  staging/android: remove SYNC_WAIT ioctl
  staging/android: rename sync_pt_info to fence_info
  staging/android: rename sync_file_info_data to sync_file_info
  staging/android: remove driver_data from struct fence_info
  staging/android: remove len field from struct fence_info
  staging/android: turn fence_info into a __u64 pointer
  staging/android: add num_fences field to struct sync_file_info
  staging/android: make info->len return only the size of fence_infos
  staging/android: rename SYNC_IOC_FENCE_INFO
  staging/android: add flags member to sync ioctl structs
  staging/android: remove redundant comments on sync_merge_data

 drivers/staging/android/sw_sync.c    |  14 ----
 drivers/staging/android/sync.c       | 128 +++++++++--------------------------
 drivers/staging/android/sync.h       |  20 ------
 drivers/staging/android/trace/sync.h |  44 ------------
 drivers/staging/android/uapi/sync.h  |  50 ++++++--------
 5 files changed, 55 insertions(+), 201 deletions(-)

-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH v2 01/11] staging/android: remove SYNC_WAIT ioctl
  2016-02-02 13:23 ` Gustavo Padovan
@ 2016-02-02 13:23   ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

This ioctl is replicating the work of poll() syscall so let's take the
opportunity that this is still on staging tree and remove the duplication
and force new users to use the poll() standard interface.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c       | 52 ------------------------------------
 drivers/staging/android/sync.h       | 13 ---------
 drivers/staging/android/trace/sync.h | 44 ------------------------------
 drivers/staging/android/uapi/sync.h  |  7 -----
 4 files changed, 116 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 5fa4779..381209a 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -300,44 +300,6 @@ struct sync_file *sync_file_merge(const char *name,
 }
 EXPORT_SYMBOL(sync_file_merge);
 
-int sync_file_wait(struct sync_file *sync_file, long timeout)
-{
-	long ret;
-	int i;
-
-	if (timeout < 0)
-		timeout = MAX_SCHEDULE_TIMEOUT;
-	else
-		timeout = msecs_to_jiffies(timeout);
-
-	trace_sync_wait(sync_file, 1);
-	for (i = 0; i < sync_file->num_fences; ++i)
-		trace_fence(sync_file->cbs[i].fence);
-	ret = wait_event_interruptible_timeout(sync_file->wq,
-					       atomic_read(&sync_file->status) <= 0,
-					       timeout);
-	trace_sync_wait(sync_file, 0);
-
-	if (ret < 0) {
-		return ret;
-	} else if (ret == 0) {
-		if (timeout) {
-			pr_info("sync_file timeout on [%p] after %dms\n",
-				sync_file, jiffies_to_msecs(timeout));
-			sync_dump();
-		}
-		return -ETIME;
-	}
-
-	ret = atomic_read(&sync_file->status);
-	if (ret) {
-		pr_info("sync_file error %ld on [%p]\n", ret, sync_file);
-		sync_dump();
-	}
-	return ret;
-}
-EXPORT_SYMBOL(sync_file_wait);
-
 static const char *android_fence_get_driver_name(struct fence *fence)
 {
 	struct sync_timeline *parent = fence_parent(fence);
@@ -478,17 +440,6 @@ static unsigned int sync_file_poll(struct file *file, poll_table *wait)
 	return 0;
 }
 
-static long sync_file_ioctl_wait(struct sync_file *sync_file,
-				  unsigned long arg)
-{
-	__s32 value;
-
-	if (copy_from_user(&value, (void __user *)arg, sizeof(value)))
-		return -EFAULT;
-
-	return sync_file_wait(sync_file, value);
-}
-
 static long sync_file_ioctl_merge(struct sync_file *sync_file,
 				   unsigned long arg)
 {
@@ -629,9 +580,6 @@ static long sync_file_ioctl(struct file *file, unsigned int cmd,
 	struct sync_file *sync_file = file->private_data;
 
 	switch (cmd) {
-	case SYNC_IOC_WAIT:
-		return sync_file_ioctl_wait(sync_file, arg);
-
 	case SYNC_IOC_MERGE:
 		return sync_file_ioctl_merge(sync_file, arg);
 
diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index 8980b55..af1af99 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -18,7 +18,6 @@
 #include <linux/ktime.h>
 #include <linux/list.h>
 #include <linux/spinlock.h>
-#include <linux/wait.h>
 #include <linux/fence.h>
 
 #include "uapi/sync.h"
@@ -230,18 +229,6 @@ void sync_file_put(struct sync_file *sync_file);
  */
 void sync_file_install(struct sync_file *sync_file, int fd);
 
-/**
- * sync_file_wait() - wait on sync file
- * @sync_file:	file to wait on
- * @tiemout:	timeout in ms
- *
- * Wait for @sync_file to be signaled or have an error. Waits indefinitely
- * if @timeout < 0.
- *
- * Returns 0 if fence signaled, > 0 if it is still active and <0 on error
- */
-int sync_file_wait(struct sync_file *sync_file, long timeout);
-
 #ifdef CONFIG_DEBUG_FS
 
 void sync_timeline_debug_add(struct sync_timeline *obj);
diff --git a/drivers/staging/android/trace/sync.h b/drivers/staging/android/trace/sync.h
index 87c60e9..a0f80f4 100644
--- a/drivers/staging/android/trace/sync.h
+++ b/drivers/staging/android/trace/sync.h
@@ -32,50 +32,6 @@ TRACE_EVENT(sync_timeline,
 	TP_printk("name=%s value=%s", __get_str(name), __entry->value)
 );
 
-TRACE_EVENT(sync_wait,
-	TP_PROTO(struct sync_file *sync_file, int begin),
-
-	TP_ARGS(sync_file, begin),
-
-	TP_STRUCT__entry(
-			__string(name, sync_file->name)
-			__field(s32, status)
-			__field(u32, begin)
-	),
-
-	TP_fast_assign(
-			__assign_str(name, sync_file->name);
-			__entry->status = atomic_read(&sync_file->status);
-			__entry->begin = begin;
-	),
-
-	TP_printk("%s name=%s state=%d", __entry->begin ? "begin" : "end",
-			__get_str(name), __entry->status)
-);
-
-TRACE_EVENT(fence,
-	TP_PROTO(struct fence *fence),
-
-	TP_ARGS(fence),
-
-	TP_STRUCT__entry(
-		__string(timeline, fence->ops->get_timeline_name(fence))
-		__array(char, value, 32)
-	),
-
-	TP_fast_assign(
-		__assign_str(timeline, fence->ops->get_timeline_name(fence));
-		if (fence->ops->fence_value_str) {
-			fence->ops->fence_value_str(fence, __entry->value,
-							sizeof(__entry->value));
-		} else {
-			__entry->value[0] = '\0';
-		}
-	),
-
-	TP_printk("name=%s value=%s", __get_str(timeline), __entry->value)
-);
-
 #endif /* if !defined(_TRACE_SYNC_H) || defined(TRACE_HEADER_MULTI_READ) */
 
 /* This part must be outside protection */
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 73deb69..6c88c80 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -65,13 +65,6 @@ struct sync_file_info_data {
 #define SYNC_IOC_MAGIC		'>'
 
 /**
- * DOC: SYNC_IOC_WAIT - wait for a fence to signal
- *
- * pass timeout in milliseconds.  Waits indefinitely timeout < 0.
- */
-#define SYNC_IOC_WAIT		_IOW(SYNC_IOC_MAGIC, 0, __s32)
-
-/**
  * DOC: SYNC_IOC_MERGE - merge two fences
  *
  * Takes a struct sync_merge_data.  Creates a new fence containing copies of
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 01/11] staging/android: remove SYNC_WAIT ioctl
@ 2016-02-02 13:23   ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Daniel Stone, Daniel Vetter, Riley Andrews, dri-devel,
	linux-kernel, Arve Hjønnevåg, Gustavo Padovan,
	John Harrison

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

This ioctl is replicating the work of poll() syscall so let's take the
opportunity that this is still on staging tree and remove the duplication
and force new users to use the poll() standard interface.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c       | 52 ------------------------------------
 drivers/staging/android/sync.h       | 13 ---------
 drivers/staging/android/trace/sync.h | 44 ------------------------------
 drivers/staging/android/uapi/sync.h  |  7 -----
 4 files changed, 116 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 5fa4779..381209a 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -300,44 +300,6 @@ struct sync_file *sync_file_merge(const char *name,
 }
 EXPORT_SYMBOL(sync_file_merge);
 
-int sync_file_wait(struct sync_file *sync_file, long timeout)
-{
-	long ret;
-	int i;
-
-	if (timeout < 0)
-		timeout = MAX_SCHEDULE_TIMEOUT;
-	else
-		timeout = msecs_to_jiffies(timeout);
-
-	trace_sync_wait(sync_file, 1);
-	for (i = 0; i < sync_file->num_fences; ++i)
-		trace_fence(sync_file->cbs[i].fence);
-	ret = wait_event_interruptible_timeout(sync_file->wq,
-					       atomic_read(&sync_file->status) <= 0,
-					       timeout);
-	trace_sync_wait(sync_file, 0);
-
-	if (ret < 0) {
-		return ret;
-	} else if (ret == 0) {
-		if (timeout) {
-			pr_info("sync_file timeout on [%p] after %dms\n",
-				sync_file, jiffies_to_msecs(timeout));
-			sync_dump();
-		}
-		return -ETIME;
-	}
-
-	ret = atomic_read(&sync_file->status);
-	if (ret) {
-		pr_info("sync_file error %ld on [%p]\n", ret, sync_file);
-		sync_dump();
-	}
-	return ret;
-}
-EXPORT_SYMBOL(sync_file_wait);
-
 static const char *android_fence_get_driver_name(struct fence *fence)
 {
 	struct sync_timeline *parent = fence_parent(fence);
@@ -478,17 +440,6 @@ static unsigned int sync_file_poll(struct file *file, poll_table *wait)
 	return 0;
 }
 
-static long sync_file_ioctl_wait(struct sync_file *sync_file,
-				  unsigned long arg)
-{
-	__s32 value;
-
-	if (copy_from_user(&value, (void __user *)arg, sizeof(value)))
-		return -EFAULT;
-
-	return sync_file_wait(sync_file, value);
-}
-
 static long sync_file_ioctl_merge(struct sync_file *sync_file,
 				   unsigned long arg)
 {
@@ -629,9 +580,6 @@ static long sync_file_ioctl(struct file *file, unsigned int cmd,
 	struct sync_file *sync_file = file->private_data;
 
 	switch (cmd) {
-	case SYNC_IOC_WAIT:
-		return sync_file_ioctl_wait(sync_file, arg);
-
 	case SYNC_IOC_MERGE:
 		return sync_file_ioctl_merge(sync_file, arg);
 
diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index 8980b55..af1af99 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -18,7 +18,6 @@
 #include <linux/ktime.h>
 #include <linux/list.h>
 #include <linux/spinlock.h>
-#include <linux/wait.h>
 #include <linux/fence.h>
 
 #include "uapi/sync.h"
@@ -230,18 +229,6 @@ void sync_file_put(struct sync_file *sync_file);
  */
 void sync_file_install(struct sync_file *sync_file, int fd);
 
-/**
- * sync_file_wait() - wait on sync file
- * @sync_file:	file to wait on
- * @tiemout:	timeout in ms
- *
- * Wait for @sync_file to be signaled or have an error. Waits indefinitely
- * if @timeout < 0.
- *
- * Returns 0 if fence signaled, > 0 if it is still active and <0 on error
- */
-int sync_file_wait(struct sync_file *sync_file, long timeout);
-
 #ifdef CONFIG_DEBUG_FS
 
 void sync_timeline_debug_add(struct sync_timeline *obj);
diff --git a/drivers/staging/android/trace/sync.h b/drivers/staging/android/trace/sync.h
index 87c60e9..a0f80f4 100644
--- a/drivers/staging/android/trace/sync.h
+++ b/drivers/staging/android/trace/sync.h
@@ -32,50 +32,6 @@ TRACE_EVENT(sync_timeline,
 	TP_printk("name=%s value=%s", __get_str(name), __entry->value)
 );
 
-TRACE_EVENT(sync_wait,
-	TP_PROTO(struct sync_file *sync_file, int begin),
-
-	TP_ARGS(sync_file, begin),
-
-	TP_STRUCT__entry(
-			__string(name, sync_file->name)
-			__field(s32, status)
-			__field(u32, begin)
-	),
-
-	TP_fast_assign(
-			__assign_str(name, sync_file->name);
-			__entry->status = atomic_read(&sync_file->status);
-			__entry->begin = begin;
-	),
-
-	TP_printk("%s name=%s state=%d", __entry->begin ? "begin" : "end",
-			__get_str(name), __entry->status)
-);
-
-TRACE_EVENT(fence,
-	TP_PROTO(struct fence *fence),
-
-	TP_ARGS(fence),
-
-	TP_STRUCT__entry(
-		__string(timeline, fence->ops->get_timeline_name(fence))
-		__array(char, value, 32)
-	),
-
-	TP_fast_assign(
-		__assign_str(timeline, fence->ops->get_timeline_name(fence));
-		if (fence->ops->fence_value_str) {
-			fence->ops->fence_value_str(fence, __entry->value,
-							sizeof(__entry->value));
-		} else {
-			__entry->value[0] = '\0';
-		}
-	),
-
-	TP_printk("name=%s value=%s", __get_str(timeline), __entry->value)
-);
-
 #endif /* if !defined(_TRACE_SYNC_H) || defined(TRACE_HEADER_MULTI_READ) */
 
 /* This part must be outside protection */
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 73deb69..6c88c80 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -65,13 +65,6 @@ struct sync_file_info_data {
 #define SYNC_IOC_MAGIC		'>'
 
 /**
- * DOC: SYNC_IOC_WAIT - wait for a fence to signal
- *
- * pass timeout in milliseconds.  Waits indefinitely timeout < 0.
- */
-#define SYNC_IOC_WAIT		_IOW(SYNC_IOC_MAGIC, 0, __s32)
-
-/**
  * DOC: SYNC_IOC_MERGE - merge two fences
  *
  * Takes a struct sync_merge_data.  Creates a new fence containing copies of
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 02/11] staging/android: rename sync_pt_info to fence_info
  2016-02-02 13:23 ` Gustavo Padovan
@ 2016-02-02 13:23   ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

As struct sync_pt doesn't exist anymore it is a good idea remove any
reference to it in the sync_framework. sync_pts were replaced directly by
fences.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 10 +++++-----
 drivers/staging/android/uapi/sync.h | 12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 381209a..d873a55 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -490,15 +490,15 @@ err_put_fd:
 	return err;
 }
 
-static int sync_fill_pt_info(struct fence *fence, void *data, int size)
+static int sync_fill_fence_info(struct fence *fence, void *data, int size)
 {
-	struct sync_pt_info *info = data;
+	struct fence_info *info = data;
 	int ret;
 
-	if (size < sizeof(struct sync_pt_info))
+	if (size < sizeof(*info))
 		return -ENOMEM;
 
-	info->len = sizeof(struct sync_pt_info);
+	info->len = sizeof(*info);
 
 	if (fence->ops->fill_driver_data) {
 		ret = fence->ops->fill_driver_data(fence, info->driver_data,
@@ -553,7 +553,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 	for (i = 0; i < sync_file->num_fences; ++i) {
 		struct fence *fence = sync_file->cbs[i].fence;
 
-		ret = sync_fill_pt_info(fence, (u8 *)data + len, size - len);
+		ret = sync_fill_fence_info(fence, (u8 *)data + len, size - len);
 
 		if (ret < 0)
 			goto out;
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 6c88c80..c4703ec 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -27,15 +27,15 @@ struct sync_merge_data {
 };
 
 /**
- * struct sync_pt_info - detailed sync_pt information
- * @len:		length of sync_pt_info including any driver_data
+ * struct fence_info - detailed fence information
+ * @len:		length of fence_info including any driver_data
  * @obj_name:		name of parent sync_timeline
  * @driver_name:	name of driver implementing the parent
- * @status:		status of the sync_pt 0:active 1:signaled <0:error
+ * @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_pt_info {
+struct fence_info {
 	__u32	len;
 	char	obj_name[32];
 	char	driver_name[32];
@@ -52,14 +52,14 @@ struct sync_pt_info {
  *		userspace including pt_info.
  * @name:	name of fence
  * @status:	status of fence. 1: signaled 0:active <0:error
- * @pt_info:	a sync_pt_info struct for every sync_pt in the fence
+ * @fence_info:	a fence_info struct for every fence in the sync_file
  */
 struct sync_file_info_data {
 	__u32	len;
 	char	name[32];
 	__s32	status;
 
-	__u8	pt_info[0];
+	__u8	fence_info[0];
 };
 
 #define SYNC_IOC_MAGIC		'>'
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 02/11] staging/android: rename sync_pt_info to fence_info
@ 2016-02-02 13:23   ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Daniel Stone, Daniel Vetter, Riley Andrews, dri-devel,
	linux-kernel, Arve Hjønnevåg, Gustavo Padovan,
	John Harrison

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

As struct sync_pt doesn't exist anymore it is a good idea remove any
reference to it in the sync_framework. sync_pts were replaced directly by
fences.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 10 +++++-----
 drivers/staging/android/uapi/sync.h | 12 ++++++------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 381209a..d873a55 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -490,15 +490,15 @@ err_put_fd:
 	return err;
 }
 
-static int sync_fill_pt_info(struct fence *fence, void *data, int size)
+static int sync_fill_fence_info(struct fence *fence, void *data, int size)
 {
-	struct sync_pt_info *info = data;
+	struct fence_info *info = data;
 	int ret;
 
-	if (size < sizeof(struct sync_pt_info))
+	if (size < sizeof(*info))
 		return -ENOMEM;
 
-	info->len = sizeof(struct sync_pt_info);
+	info->len = sizeof(*info);
 
 	if (fence->ops->fill_driver_data) {
 		ret = fence->ops->fill_driver_data(fence, info->driver_data,
@@ -553,7 +553,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 	for (i = 0; i < sync_file->num_fences; ++i) {
 		struct fence *fence = sync_file->cbs[i].fence;
 
-		ret = sync_fill_pt_info(fence, (u8 *)data + len, size - len);
+		ret = sync_fill_fence_info(fence, (u8 *)data + len, size - len);
 
 		if (ret < 0)
 			goto out;
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 6c88c80..c4703ec 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -27,15 +27,15 @@ struct sync_merge_data {
 };
 
 /**
- * struct sync_pt_info - detailed sync_pt information
- * @len:		length of sync_pt_info including any driver_data
+ * struct fence_info - detailed fence information
+ * @len:		length of fence_info including any driver_data
  * @obj_name:		name of parent sync_timeline
  * @driver_name:	name of driver implementing the parent
- * @status:		status of the sync_pt 0:active 1:signaled <0:error
+ * @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_pt_info {
+struct fence_info {
 	__u32	len;
 	char	obj_name[32];
 	char	driver_name[32];
@@ -52,14 +52,14 @@ struct sync_pt_info {
  *		userspace including pt_info.
  * @name:	name of fence
  * @status:	status of fence. 1: signaled 0:active <0:error
- * @pt_info:	a sync_pt_info struct for every sync_pt in the fence
+ * @fence_info:	a fence_info struct for every fence in the sync_file
  */
 struct sync_file_info_data {
 	__u32	len;
 	char	name[32];
 	__s32	status;
 
-	__u8	pt_info[0];
+	__u8	fence_info[0];
 };
 
 #define SYNC_IOC_MAGIC		'>'
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 03/11] staging/android: rename sync_file_info_data to sync_file_info
  2016-02-02 13:23 ` Gustavo Padovan
@ 2016-02-02 13:23   ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

info_data is a bit redundant, let's keep it as only sync_file_info. It is
also smaller.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 26 +++++++++++++-------------
 drivers/staging/android/uapi/sync.h |  9 ++++-----
 2 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index d873a55..3893656 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -525,7 +525,7 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
 static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 					unsigned long arg)
 {
-	struct sync_file_info_data *data;
+	struct sync_file_info *info;
 	__u32 size;
 	__u32 len = 0;
 	int ret, i;
@@ -533,27 +533,27 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 	if (copy_from_user(&size, (void __user *)arg, sizeof(size)))
 		return -EFAULT;
 
-	if (size < sizeof(struct sync_file_info_data))
+	if (size < sizeof(struct sync_file_info))
 		return -EINVAL;
 
 	if (size > 4096)
 		size = 4096;
 
-	data = kzalloc(size, GFP_KERNEL);
-	if (!data)
+	info = kzalloc(size, GFP_KERNEL);
+	if (!info)
 		return -ENOMEM;
 
-	strlcpy(data->name, sync_file->name, sizeof(data->name));
-	data->status = atomic_read(&sync_file->status);
-	if (data->status >= 0)
-		data->status = !data->status;
+	strlcpy(info->name, sync_file->name, sizeof(info->name));
+	info->status = atomic_read(&sync_file->status);
+	if (info->status >= 0)
+		info->status = !info->status;
 
-	len = sizeof(struct sync_file_info_data);
+	len = sizeof(struct sync_file_info);
 
 	for (i = 0; i < sync_file->num_fences; ++i) {
 		struct fence *fence = sync_file->cbs[i].fence;
 
-		ret = sync_fill_fence_info(fence, (u8 *)data + len, size - len);
+		ret = sync_fill_fence_info(fence, (u8 *)info + len, size - len);
 
 		if (ret < 0)
 			goto out;
@@ -561,15 +561,15 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 		len += ret;
 	}
 
-	data->len = len;
+	info->len = len;
 
-	if (copy_to_user((void __user *)arg, data, len))
+	if (copy_to_user((void __user *)arg, info, len))
 		ret = -EFAULT;
 	else
 		ret = 0;
 
 out:
-	kfree(data);
+	kfree(info);
 
 	return ret;
 }
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index c4703ec..70d05ad 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -46,15 +46,15 @@ struct fence_info {
 };
 
 /**
- * struct sync_file_info_data - data returned from fence info ioctl
+ * struct sync_file_info - data returned from fence info ioctl
  * @len:	ioctl caller writes the size of the buffer its passing in.
- *		ioctl returns length of sync_file_info_data returned to
+ *		ioctl returns length of sync_file_info returned to
  *		userspace including pt_info.
  * @name:	name of fence
  * @status:	status of fence. 1: signaled 0:active <0:error
  * @fence_info:	a fence_info struct for every fence in the sync_file
  */
-struct sync_file_info_data {
+struct sync_file_info {
 	__u32	len;
 	char	name[32];
 	__s32	status;
@@ -84,7 +84,6 @@ struct sync_file_info_data {
  * pt_info is a buffer containing sync_pt_infos for every sync_pt in the fence.
  * To iterate over the sync_pt_infos, use the sync_pt_info.len field.
  */
-#define SYNC_IOC_FENCE_INFO	_IOWR(SYNC_IOC_MAGIC, 2,\
-	struct sync_file_info_data)
+#define SYNC_IOC_FENCE_INFO	_IOWR(SYNC_IOC_MAGIC, 2, struct sync_file_info)
 
 #endif /* _UAPI_LINUX_SYNC_H */
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 03/11] staging/android: rename sync_file_info_data to sync_file_info
@ 2016-02-02 13:23   ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Daniel Stone, Daniel Vetter, Riley Andrews, dri-devel,
	linux-kernel, Arve Hjønnevåg, Gustavo Padovan,
	John Harrison

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

info_data is a bit redundant, let's keep it as only sync_file_info. It is
also smaller.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 26 +++++++++++++-------------
 drivers/staging/android/uapi/sync.h |  9 ++++-----
 2 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index d873a55..3893656 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -525,7 +525,7 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
 static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 					unsigned long arg)
 {
-	struct sync_file_info_data *data;
+	struct sync_file_info *info;
 	__u32 size;
 	__u32 len = 0;
 	int ret, i;
@@ -533,27 +533,27 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 	if (copy_from_user(&size, (void __user *)arg, sizeof(size)))
 		return -EFAULT;
 
-	if (size < sizeof(struct sync_file_info_data))
+	if (size < sizeof(struct sync_file_info))
 		return -EINVAL;
 
 	if (size > 4096)
 		size = 4096;
 
-	data = kzalloc(size, GFP_KERNEL);
-	if (!data)
+	info = kzalloc(size, GFP_KERNEL);
+	if (!info)
 		return -ENOMEM;
 
-	strlcpy(data->name, sync_file->name, sizeof(data->name));
-	data->status = atomic_read(&sync_file->status);
-	if (data->status >= 0)
-		data->status = !data->status;
+	strlcpy(info->name, sync_file->name, sizeof(info->name));
+	info->status = atomic_read(&sync_file->status);
+	if (info->status >= 0)
+		info->status = !info->status;
 
-	len = sizeof(struct sync_file_info_data);
+	len = sizeof(struct sync_file_info);
 
 	for (i = 0; i < sync_file->num_fences; ++i) {
 		struct fence *fence = sync_file->cbs[i].fence;
 
-		ret = sync_fill_fence_info(fence, (u8 *)data + len, size - len);
+		ret = sync_fill_fence_info(fence, (u8 *)info + len, size - len);
 
 		if (ret < 0)
 			goto out;
@@ -561,15 +561,15 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 		len += ret;
 	}
 
-	data->len = len;
+	info->len = len;
 
-	if (copy_to_user((void __user *)arg, data, len))
+	if (copy_to_user((void __user *)arg, info, len))
 		ret = -EFAULT;
 	else
 		ret = 0;
 
 out:
-	kfree(data);
+	kfree(info);
 
 	return ret;
 }
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index c4703ec..70d05ad 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -46,15 +46,15 @@ struct fence_info {
 };
 
 /**
- * struct sync_file_info_data - data returned from fence info ioctl
+ * struct sync_file_info - data returned from fence info ioctl
  * @len:	ioctl caller writes the size of the buffer its passing in.
- *		ioctl returns length of sync_file_info_data returned to
+ *		ioctl returns length of sync_file_info returned to
  *		userspace including pt_info.
  * @name:	name of fence
  * @status:	status of fence. 1: signaled 0:active <0:error
  * @fence_info:	a fence_info struct for every fence in the sync_file
  */
-struct sync_file_info_data {
+struct sync_file_info {
 	__u32	len;
 	char	name[32];
 	__s32	status;
@@ -84,7 +84,6 @@ struct sync_file_info_data {
  * pt_info is a buffer containing sync_pt_infos for every sync_pt in the fence.
  * To iterate over the sync_pt_infos, use the sync_pt_info.len field.
  */
-#define SYNC_IOC_FENCE_INFO	_IOWR(SYNC_IOC_MAGIC, 2,\
-	struct sync_file_info_data)
+#define SYNC_IOC_FENCE_INFO	_IOWR(SYNC_IOC_MAGIC, 2, struct sync_file_info)
 
 #endif /* _UAPI_LINUX_SYNC_H */
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 04/11] staging/android: remove driver_data from struct fence_info
  2016-02-02 13:23 ` Gustavo Padovan
@ 2016-02-02 13:23   ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

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>
---
 drivers/staging/android/sw_sync.c   | 14 --------------
 drivers/staging/android/sync.c      | 21 ---------------------
 drivers/staging/android/sync.h      |  7 -------
 drivers/staging/android/uapi/sync.h |  5 +----
 4 files changed, 1 insertion(+), 46 deletions(-)

diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c
index 3bee959..af39ff5 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -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,
 };
diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 3893656..87c9182 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -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 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),
diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index af1af99..d2a1734 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -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
  */
@@ -46,9 +42,6 @@ struct sync_timeline_ops {
 	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);
 
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 70d05ad..cdc0f04 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -28,12 +28,11 @@ struct sync_merge_data {
 
 /**
  * struct fence_info - detailed fence information
- * @len:		length of fence_info including any driver_data
+ * @len:		length of 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 fence_info {
 	__u32	len;
@@ -41,8 +40,6 @@ struct fence_info {
 	char	driver_name[32];
 	__s32	status;
 	__u64	timestamp_ns;
-
-	__u8	driver_data[0];
 };
 
 /**
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 04/11] staging/android: remove driver_data from struct fence_info
@ 2016-02-02 13:23   ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Rob Clark, Daniel Stone, Daniel Vetter, Maarten Lankhorst,
	Riley Andrews, dri-devel, linux-kernel, Arve Hjønnevåg,
	Greg Hackmann, Gustavo Padovan, John Harrison

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

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>
---
 drivers/staging/android/sw_sync.c   | 14 --------------
 drivers/staging/android/sync.c      | 21 ---------------------
 drivers/staging/android/sync.h      |  7 -------
 drivers/staging/android/uapi/sync.h |  5 +----
 4 files changed, 1 insertion(+), 46 deletions(-)

diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c
index 3bee959..af39ff5 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -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,
 };
diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 3893656..87c9182 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -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 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),
diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index af1af99..d2a1734 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -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
  */
@@ -46,9 +42,6 @@ struct sync_timeline_ops {
 	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);
 
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 70d05ad..cdc0f04 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -28,12 +28,11 @@ struct sync_merge_data {
 
 /**
  * struct fence_info - detailed fence information
- * @len:		length of fence_info including any driver_data
+ * @len:		length of 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 fence_info {
 	__u32	len;
@@ -41,8 +40,6 @@ struct fence_info {
 	char	driver_name[32];
 	__s32	status;
 	__u64	timestamp_ns;
-
-	__u8	driver_data[0];
 };
 
 /**
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 05/11] staging/android: remove len field from struct fence_info
  2016-02-02 13:23 ` Gustavo Padovan
@ 2016-02-02 13:23   ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

After removing driver_data struct fence_info has now a fixed size,
thus it doesn't need any field to tell its size, it is already known.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 4 +---
 drivers/staging/android/uapi/sync.h | 2 --
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 87c9182..f7530f0 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -486,8 +486,6 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
 	if (size < sizeof(*info))
 		return -ENOMEM;
 
-	info->len = sizeof(*info);
-
 	strlcpy(info->obj_name, fence->ops->get_timeline_name(fence),
 		sizeof(info->obj_name));
 	strlcpy(info->driver_name, fence->ops->get_driver_name(fence),
@@ -498,7 +496,7 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
 		info->status = 0;
 	info->timestamp_ns = ktime_to_ns(fence->timestamp);
 
-	return info->len;
+	return sizeof(*info);
 }
 
 static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index cdc0f04..ed281fc 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -28,14 +28,12 @@ struct sync_merge_data {
 
 /**
  * struct fence_info - detailed fence information
- * @len:		length of 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
  */
 struct fence_info {
-	__u32	len;
 	char	obj_name[32];
 	char	driver_name[32];
 	__s32	status;
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 05/11] staging/android: remove len field from struct fence_info
@ 2016-02-02 13:23   ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Rob Clark, Daniel Stone, Daniel Vetter, Maarten Lankhorst,
	Riley Andrews, dri-devel, linux-kernel, Arve Hjønnevåg,
	Greg Hackmann, Gustavo Padovan, John Harrison

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

After removing driver_data struct fence_info has now a fixed size,
thus it doesn't need any field to tell its size, it is already known.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 4 +---
 drivers/staging/android/uapi/sync.h | 2 --
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 87c9182..f7530f0 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -486,8 +486,6 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
 	if (size < sizeof(*info))
 		return -ENOMEM;
 
-	info->len = sizeof(*info);
-
 	strlcpy(info->obj_name, fence->ops->get_timeline_name(fence),
 		sizeof(info->obj_name));
 	strlcpy(info->driver_name, fence->ops->get_driver_name(fence),
@@ -498,7 +496,7 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
 		info->status = 0;
 	info->timestamp_ns = ktime_to_ns(fence->timestamp);
 
-	return info->len;
+	return sizeof(*info);
 }
 
 static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index cdc0f04..ed281fc 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -28,14 +28,12 @@ struct sync_merge_data {
 
 /**
  * struct fence_info - detailed fence information
- * @len:		length of 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
  */
 struct fence_info {
-	__u32	len;
 	char	obj_name[32];
 	char	driver_name[32];
 	__s32	status;
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 06/11] staging/android: turn fence_info into a __u64 pointer
  2016-02-02 13:23 ` Gustavo Padovan
@ 2016-02-02 13:23   ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

Making fence_info a pointer enables us to extend the struct in the future
without breaking the ABI.

v2: use type __u64 for fence_info

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 2 +-
 drivers/staging/android/uapi/sync.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index f7530f0..03b1214 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -525,7 +525,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 	if (info->status >= 0)
 		info->status = !info->status;
 
-	len = sizeof(struct sync_file_info);
+	len = sizeof(struct sync_file_info) - sizeof(__u64);
 
 	for (i = 0; i < sync_file->num_fences; ++i) {
 		struct fence *fence = sync_file->cbs[i].fence;
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index ed281fc..8e2ed32 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -54,7 +54,7 @@ struct sync_file_info {
 	char	name[32];
 	__s32	status;
 
-	__u8	fence_info[0];
+	__u64	fence_info;
 };
 
 #define SYNC_IOC_MAGIC		'>'
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 06/11] staging/android: turn fence_info into a __u64 pointer
@ 2016-02-02 13:23   ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Rob Clark, Daniel Stone, Daniel Vetter, Maarten Lankhorst,
	Riley Andrews, dri-devel, linux-kernel, Arve Hjønnevåg,
	Greg Hackmann, Gustavo Padovan, John Harrison

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

Making fence_info a pointer enables us to extend the struct in the future
without breaking the ABI.

v2: use type __u64 for fence_info

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 2 +-
 drivers/staging/android/uapi/sync.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index f7530f0..03b1214 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -525,7 +525,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 	if (info->status >= 0)
 		info->status = !info->status;
 
-	len = sizeof(struct sync_file_info);
+	len = sizeof(struct sync_file_info) - sizeof(__u64);
 
 	for (i = 0; i < sync_file->num_fences; ++i) {
 		struct fence *fence = sync_file->cbs[i].fence;
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index ed281fc..8e2ed32 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -54,7 +54,7 @@ struct sync_file_info {
 	char	name[32];
 	__s32	status;
 
-	__u8	fence_info[0];
+	__u64	fence_info;
 };
 
 #define SYNC_IOC_MAGIC		'>'
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 07/11] staging/android: add num_fences field to struct sync_file_info
  2016-02-02 13:23 ` Gustavo Padovan
                   ` (6 preceding siblings ...)
  (?)
@ 2016-02-02 13:23 ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

Inform the users how many fences are in the fence_info field.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 2 ++
 drivers/staging/android/uapi/sync.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 03b1214..ba7d461 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -525,6 +525,8 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 	if (info->status >= 0)
 		info->status = !info->status;
 
+	info->num_fences = sync_file->num_fences;
+
 	len = sizeof(struct sync_file_info) - sizeof(__u64);
 
 	for (i = 0; i < sync_file->num_fences; ++i) {
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 8e2ed32..01a10b7 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -47,12 +47,14 @@ struct fence_info {
  *		userspace including pt_info.
  * @name:	name of fence
  * @status:	status of fence. 1: signaled 0:active <0:error
+ * @num_fences	number of fences in the sync_file
  * @fence_info:	a fence_info struct for every fence in the sync_file
  */
 struct sync_file_info {
 	__u32	len;
 	char	name[32];
 	__s32	status;
+	__u32	num_fences;
 
 	__u64	fence_info;
 };
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 08/11] staging/android: make info->len return only the size of fence_infos
  2016-02-02 13:23 ` Gustavo Padovan
@ 2016-02-02 13:23   ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

The len member of struct sync_file_info was returning the size of the whole
buffer (struct sync_file_info + fence_infos at the of it). This commit
change it to return only the size of the array of fence_infos.

It also moves len to be right before the fences_infos struct.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 16 +++++++++++-----
 drivers/staging/android/uapi/sync.h |  7 +++----
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index ba7d461..e5fbf5a 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -502,14 +502,19 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
 static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 					unsigned long arg)
 {
-	struct sync_file_info *info;
+	struct sync_file_info in, *info;
 	__u32 size;
-	__u32 len = 0;
+	__u32 b_len, len = 0;
 	int ret, i;
 
-	if (copy_from_user(&size, (void __user *)arg, sizeof(size)))
+	if (copy_from_user(&in, (void __user *)arg, sizeof(*info)))
 		return -EFAULT;
 
+	if (in.name || in.status || in.num_fences || in.fence_info)
+		return -EFAULT;
+
+	size = in.len;
+
 	if (size < sizeof(struct sync_file_info))
 		return -EINVAL;
 
@@ -527,8 +532,9 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 
 	info->num_fences = sync_file->num_fences;
 
-	len = sizeof(struct sync_file_info) - sizeof(__u64);
+	b_len = sizeof(struct sync_file_info) - sizeof(__u64);
 
+	len = b_len;
 	for (i = 0; i < sync_file->num_fences; ++i) {
 		struct fence *fence = sync_file->cbs[i].fence;
 
@@ -540,7 +546,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 		len += ret;
 	}
 
-	info->len = len;
+	info->len = len - b_len;
 
 	if (copy_to_user((void __user *)arg, info, len))
 		ret = -EFAULT;
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 01a10b7..9ad3763 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -42,19 +42,18 @@ struct fence_info {
 
 /**
  * struct sync_file_info - data returned from fence info ioctl
- * @len:	ioctl caller writes the size of the buffer its passing in.
- *		ioctl returns length of sync_file_info returned to
- *		userspace including pt_info.
  * @name:	name of fence
  * @status:	status of fence. 1: signaled 0:active <0:error
  * @num_fences	number of fences in the sync_file
+ * @len:	ioctl caller writes the size of the buffer its passing in.
+ *		ioctl returns length of all fence_infos summed.
  * @fence_info:	a fence_info struct for every fence in the sync_file
  */
 struct sync_file_info {
-	__u32	len;
 	char	name[32];
 	__s32	status;
 	__u32	num_fences;
+	__u32	len;
 
 	__u64	fence_info;
 };
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 08/11] staging/android: make info->len return only the size of fence_infos
@ 2016-02-02 13:23   ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Daniel Stone, Daniel Vetter, Riley Andrews, dri-devel,
	linux-kernel, Arve Hjønnevåg, Gustavo Padovan,
	John Harrison

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

The len member of struct sync_file_info was returning the size of the whole
buffer (struct sync_file_info + fence_infos at the of it). This commit
change it to return only the size of the array of fence_infos.

It also moves len to be right before the fences_infos struct.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 16 +++++++++++-----
 drivers/staging/android/uapi/sync.h |  7 +++----
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index ba7d461..e5fbf5a 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -502,14 +502,19 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
 static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 					unsigned long arg)
 {
-	struct sync_file_info *info;
+	struct sync_file_info in, *info;
 	__u32 size;
-	__u32 len = 0;
+	__u32 b_len, len = 0;
 	int ret, i;
 
-	if (copy_from_user(&size, (void __user *)arg, sizeof(size)))
+	if (copy_from_user(&in, (void __user *)arg, sizeof(*info)))
 		return -EFAULT;
 
+	if (in.name || in.status || in.num_fences || in.fence_info)
+		return -EFAULT;
+
+	size = in.len;
+
 	if (size < sizeof(struct sync_file_info))
 		return -EINVAL;
 
@@ -527,8 +532,9 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 
 	info->num_fences = sync_file->num_fences;
 
-	len = sizeof(struct sync_file_info) - sizeof(__u64);
+	b_len = sizeof(struct sync_file_info) - sizeof(__u64);
 
+	len = b_len;
 	for (i = 0; i < sync_file->num_fences; ++i) {
 		struct fence *fence = sync_file->cbs[i].fence;
 
@@ -540,7 +546,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
 		len += ret;
 	}
 
-	info->len = len;
+	info->len = len - b_len;
 
 	if (copy_to_user((void __user *)arg, info, len))
 		ret = -EFAULT;
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 01a10b7..9ad3763 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -42,19 +42,18 @@ struct fence_info {
 
 /**
  * struct sync_file_info - data returned from fence info ioctl
- * @len:	ioctl caller writes the size of the buffer its passing in.
- *		ioctl returns length of sync_file_info returned to
- *		userspace including pt_info.
  * @name:	name of fence
  * @status:	status of fence. 1: signaled 0:active <0:error
  * @num_fences	number of fences in the sync_file
+ * @len:	ioctl caller writes the size of the buffer its passing in.
+ *		ioctl returns length of all fence_infos summed.
  * @fence_info:	a fence_info struct for every fence in the sync_file
  */
 struct sync_file_info {
-	__u32	len;
 	char	name[32];
 	__s32	status;
 	__u32	num_fences;
+	__u32	len;
 
 	__u64	fence_info;
 };
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 09/11] staging/android: rename SYNC_IOC_FENCE_INFO
  2016-02-02 13:23 ` Gustavo Padovan
@ 2016-02-02 13:23   ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

We don't use the 'fence' name to refer to sync_file anymore. So rename it
to SYNC_IOC_FILE_INFO.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 2 +-
 drivers/staging/android/uapi/sync.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index e5fbf5a..397c87a 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -568,7 +568,7 @@ static long sync_file_ioctl(struct file *file, unsigned int cmd,
 	case SYNC_IOC_MERGE:
 		return sync_file_ioctl_merge(sync_file, arg);
 
-	case SYNC_IOC_FENCE_INFO:
+	case SYNC_IOC_FILE_INFO:
 		return sync_file_ioctl_fence_info(sync_file, arg);
 
 	default:
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 9ad3763..2cc6499 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -80,6 +80,6 @@ struct sync_file_info {
  * pt_info is a buffer containing sync_pt_infos for every sync_pt in the fence.
  * To iterate over the sync_pt_infos, use the sync_pt_info.len field.
  */
-#define SYNC_IOC_FENCE_INFO	_IOWR(SYNC_IOC_MAGIC, 2, struct sync_file_info)
+#define SYNC_IOC_FILE_INFO	_IOWR(SYNC_IOC_MAGIC, 2, struct sync_file_info)
 
 #endif /* _UAPI_LINUX_SYNC_H */
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 09/11] staging/android: rename SYNC_IOC_FENCE_INFO
@ 2016-02-02 13:23   ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Daniel Stone, Daniel Vetter, Riley Andrews, dri-devel,
	linux-kernel, Arve Hjønnevåg, Gustavo Padovan,
	John Harrison

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

We don't use the 'fence' name to refer to sync_file anymore. So rename it
to SYNC_IOC_FILE_INFO.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 2 +-
 drivers/staging/android/uapi/sync.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index e5fbf5a..397c87a 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -568,7 +568,7 @@ static long sync_file_ioctl(struct file *file, unsigned int cmd,
 	case SYNC_IOC_MERGE:
 		return sync_file_ioctl_merge(sync_file, arg);
 
-	case SYNC_IOC_FENCE_INFO:
+	case SYNC_IOC_FILE_INFO:
 		return sync_file_ioctl_fence_info(sync_file, arg);
 
 	default:
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 9ad3763..2cc6499 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -80,6 +80,6 @@ struct sync_file_info {
  * pt_info is a buffer containing sync_pt_infos for every sync_pt in the fence.
  * To iterate over the sync_pt_infos, use the sync_pt_info.len field.
  */
-#define SYNC_IOC_FENCE_INFO	_IOWR(SYNC_IOC_MAGIC, 2, struct sync_file_info)
+#define SYNC_IOC_FILE_INFO	_IOWR(SYNC_IOC_MAGIC, 2, struct sync_file_info)
 
 #endif /* _UAPI_LINUX_SYNC_H */
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 10/11] staging/android: add flags member to sync ioctl structs
  2016-02-02 13:23 ` Gustavo Padovan
@ 2016-02-02 13:23   ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

Play safe and add flags member to all structs. So we don't need to
break API or create new IOCTL in the future if new features that requires
flags arises.

v2: check if flags are valid (zero, in this case)

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 5 +++++
 drivers/staging/android/uapi/sync.h | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 397c87a..392f12a 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -445,6 +445,11 @@ static long sync_file_ioctl_merge(struct sync_file *sync_file,
 		goto err_put_fd;
 	}
 
+	if (data.flags) {
+		err = -EFAULT;
+		goto err_put_fd;
+	}
+
 	fence2 = sync_file_fdget(data.fd2);
 	if (!fence2) {
 		err = -ENOENT;
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 2cc6499..9b4fb27 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -19,11 +19,13 @@
  * @fd2:	file descriptor of second fence
  * @name:	name of new fence
  * @fence:	returns the fd of the new fence to userspace
+ * @flags:	merge_data flags
  */
 struct sync_merge_data {
 	__s32	fd2; /* fd of second fence */
 	char	name[32]; /* name of new fence */
 	__s32	fence; /* fd on newly created fence */
+	__u32	flags;
 };
 
 /**
@@ -31,12 +33,14 @@ struct sync_merge_data {
  * @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
+ * @flags:		fence_info flags
  * @timestamp_ns:	timestamp of status change in nanoseconds
  */
 struct fence_info {
 	char	obj_name[32];
 	char	driver_name[32];
 	__s32	status;
+	__u32	flags;
 	__u64	timestamp_ns;
 };
 
@@ -44,6 +48,7 @@ struct fence_info {
  * struct sync_file_info - data returned from fence info ioctl
  * @name:	name of fence
  * @status:	status of fence. 1: signaled 0:active <0:error
+ * @flags:	sync_file_info flags
  * @num_fences	number of fences in the sync_file
  * @len:	ioctl caller writes the size of the buffer its passing in.
  *		ioctl returns length of all fence_infos summed.
@@ -52,6 +57,7 @@ struct fence_info {
 struct sync_file_info {
 	char	name[32];
 	__s32	status;
+	__u32	flags;
 	__u32	num_fences;
 	__u32	len;
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 10/11] staging/android: add flags member to sync ioctl structs
@ 2016-02-02 13:23   ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Rob Clark, Daniel Stone, Daniel Vetter, Maarten Lankhorst,
	Riley Andrews, dri-devel, linux-kernel, Arve Hjønnevåg,
	Greg Hackmann, Gustavo Padovan, John Harrison

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

Play safe and add flags member to all structs. So we don't need to
break API or create new IOCTL in the future if new features that requires
flags arises.

v2: check if flags are valid (zero, in this case)

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/sync.c      | 5 +++++
 drivers/staging/android/uapi/sync.h | 6 ++++++
 2 files changed, 11 insertions(+)

diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
index 397c87a..392f12a 100644
--- a/drivers/staging/android/sync.c
+++ b/drivers/staging/android/sync.c
@@ -445,6 +445,11 @@ static long sync_file_ioctl_merge(struct sync_file *sync_file,
 		goto err_put_fd;
 	}
 
+	if (data.flags) {
+		err = -EFAULT;
+		goto err_put_fd;
+	}
+
 	fence2 = sync_file_fdget(data.fd2);
 	if (!fence2) {
 		err = -ENOENT;
diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 2cc6499..9b4fb27 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -19,11 +19,13 @@
  * @fd2:	file descriptor of second fence
  * @name:	name of new fence
  * @fence:	returns the fd of the new fence to userspace
+ * @flags:	merge_data flags
  */
 struct sync_merge_data {
 	__s32	fd2; /* fd of second fence */
 	char	name[32]; /* name of new fence */
 	__s32	fence; /* fd on newly created fence */
+	__u32	flags;
 };
 
 /**
@@ -31,12 +33,14 @@ struct sync_merge_data {
  * @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
+ * @flags:		fence_info flags
  * @timestamp_ns:	timestamp of status change in nanoseconds
  */
 struct fence_info {
 	char	obj_name[32];
 	char	driver_name[32];
 	__s32	status;
+	__u32	flags;
 	__u64	timestamp_ns;
 };
 
@@ -44,6 +48,7 @@ struct fence_info {
  * struct sync_file_info - data returned from fence info ioctl
  * @name:	name of fence
  * @status:	status of fence. 1: signaled 0:active <0:error
+ * @flags:	sync_file_info flags
  * @num_fences	number of fences in the sync_file
  * @len:	ioctl caller writes the size of the buffer its passing in.
  *		ioctl returns length of all fence_infos summed.
@@ -52,6 +57,7 @@ struct fence_info {
 struct sync_file_info {
 	char	name[32];
 	__s32	status;
+	__u32	flags;
 	__u32	num_fences;
 	__u32	len;
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 11/11] staging/android: remove redundant comments on sync_merge_data
  2016-02-02 13:23 ` Gustavo Padovan
@ 2016-02-02 13:23   ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Maarten Lankhorst,
	Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

struct sync_merge_data already have documentation on top of the
struct definition. No need to duplicate it.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/uapi/sync.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 9b4fb27..e5884d3 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -22,9 +22,9 @@
  * @flags:	merge_data flags
  */
 struct sync_merge_data {
-	__s32	fd2; /* fd of second fence */
-	char	name[32]; /* name of new fence */
-	__s32	fence; /* fd on newly created fence */
+	__s32	fd2;
+	char	name[32];
+	__s32	fence;
 	__u32	flags;
 };
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH v2 11/11] staging/android: remove redundant comments on sync_merge_data
@ 2016-02-02 13:23   ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 13:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Rob Clark, Daniel Stone, Daniel Vetter, Maarten Lankhorst,
	Riley Andrews, dri-devel, linux-kernel, Arve Hjønnevåg,
	Greg Hackmann, Gustavo Padovan, John Harrison

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

struct sync_merge_data already have documentation on top of the
struct definition. No need to duplicate it.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
 drivers/staging/android/uapi/sync.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
index 9b4fb27..e5884d3 100644
--- a/drivers/staging/android/uapi/sync.h
+++ b/drivers/staging/android/uapi/sync.h
@@ -22,9 +22,9 @@
  * @flags:	merge_data flags
  */
 struct sync_merge_data {
-	__s32	fd2; /* fd of second fence */
-	char	name[32]; /* name of new fence */
-	__s32	fence; /* fd on newly created fence */
+	__s32	fd2;
+	char	name[32];
+	__s32	fence;
 	__u32	flags;
 };
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 06/11] staging/android: turn fence_info into a __u64 pointer
  2016-02-02 13:23   ` Gustavo Padovan
@ 2016-02-02 14:16     ` Maarten Lankhorst
  -1 siblings, 0 replies; 35+ messages in thread
From: Maarten Lankhorst @ 2016-02-02 14:16 UTC (permalink / raw)
  To: Gustavo Padovan, Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Gustavo Padovan

Op 02-02-16 om 14:23 schreef Gustavo Padovan:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> Making fence_info a pointer enables us to extend the struct in the future
> without breaking the ABI.
>
> v2: use type __u64 for fence_info
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
>  drivers/staging/android/sync.c      | 2 +-
>  drivers/staging/android/uapi/sync.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
> index f7530f0..03b1214 100644
> --- a/drivers/staging/android/sync.c
> +++ b/drivers/staging/android/sync.c
> @@ -525,7 +525,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
>  	if (info->status >= 0)
>  		info->status = !info->status;
>  
> -	len = sizeof(struct sync_file_info);
> +	len = sizeof(struct sync_file_info) - sizeof(__u64);
>  
>  	for (i = 0; i < sync_file->num_fences; ++i) {
>  		struct fence *fence = sync_file->cbs[i].fence;
> diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
> index ed281fc..8e2ed32 100644
> --- a/drivers/staging/android/uapi/sync.h
> +++ b/drivers/staging/android/uapi/sync.h
> @@ -54,7 +54,7 @@ struct sync_file_info {
>  	char	name[32];
>  	__s32	status;
>  
> -	__u8	fence_info[0];
> +	__u64	fence_info;
>
With the information from the commit I would expect fence_info would be a true pointer.

so if (sync_file_info->num_fences == 0) not copying fence_info, but set all members including this one.
else for_all_fences() copy_to_user(fence_info struct)

Otherwise you still can't extend the struct without breaking the abi.

~Maarten

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 06/11] staging/android: turn fence_info into a __u64 pointer
@ 2016-02-02 14:16     ` Maarten Lankhorst
  0 siblings, 0 replies; 35+ messages in thread
From: Maarten Lankhorst @ 2016-02-02 14:16 UTC (permalink / raw)
  To: Gustavo Padovan, Greg Kroah-Hartman
  Cc: devel, Rob Clark, Daniel Stone, Daniel Vetter, Riley Andrews,
	dri-devel, linux-kernel, Arve Hjønnevåg, Greg Hackmann,
	Gustavo Padovan, John Harrison

Op 02-02-16 om 14:23 schreef Gustavo Padovan:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> Making fence_info a pointer enables us to extend the struct in the future
> without breaking the ABI.
>
> v2: use type __u64 for fence_info
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
>  drivers/staging/android/sync.c      | 2 +-
>  drivers/staging/android/uapi/sync.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
> index f7530f0..03b1214 100644
> --- a/drivers/staging/android/sync.c
> +++ b/drivers/staging/android/sync.c
> @@ -525,7 +525,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
>  	if (info->status >= 0)
>  		info->status = !info->status;
>  
> -	len = sizeof(struct sync_file_info);
> +	len = sizeof(struct sync_file_info) - sizeof(__u64);
>  
>  	for (i = 0; i < sync_file->num_fences; ++i) {
>  		struct fence *fence = sync_file->cbs[i].fence;
> diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
> index ed281fc..8e2ed32 100644
> --- a/drivers/staging/android/uapi/sync.h
> +++ b/drivers/staging/android/uapi/sync.h
> @@ -54,7 +54,7 @@ struct sync_file_info {
>  	char	name[32];
>  	__s32	status;
>  
> -	__u8	fence_info[0];
> +	__u64	fence_info;
>
With the information from the commit I would expect fence_info would be a true pointer.

so if (sync_file_info->num_fences == 0) not copying fence_info, but set all members including this one.
else for_all_fences() copy_to_user(fence_info struct)

Otherwise you still can't extend the struct without breaking the abi.

~Maarten

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 08/11] staging/android: make info->len return only the size of fence_infos
  2016-02-02 13:23   ` Gustavo Padovan
@ 2016-02-02 14:18     ` Maarten Lankhorst
  -1 siblings, 0 replies; 35+ messages in thread
From: Maarten Lankhorst @ 2016-02-02 14:18 UTC (permalink / raw)
  To: Gustavo Padovan, Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Gustavo Padovan

Op 02-02-16 om 14:23 schreef Gustavo Padovan:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> The len member of struct sync_file_info was returning the size of the whole
> buffer (struct sync_file_info + fence_infos at the of it). This commit
> change it to return only the size of the array of fence_infos.
>
> It also moves len to be right before the fences_infos struct.
>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
>  drivers/staging/android/sync.c      | 16 +++++++++++-----
>  drivers/staging/android/uapi/sync.h |  7 +++----
>  2 files changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
> index ba7d461..e5fbf5a 100644
> --- a/drivers/staging/android/sync.c
> +++ b/drivers/staging/android/sync.c
> @@ -502,14 +502,19 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
>  static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
>  					unsigned long arg)
>  {
> -	struct sync_file_info *info;
> +	struct sync_file_info in, *info;
>  	__u32 size;
> -	__u32 len = 0;
> +	__u32 b_len, len = 0;
>  	int ret, i;
>  
> -	if (copy_from_user(&size, (void __user *)arg, sizeof(size)))
> +	if (copy_from_user(&in, (void __user *)arg, sizeof(*info)))
>  		return -EFAULT;
>  
> +	if (in.name || in.status || in.num_fences || in.fence_info)
> +		return -EFAULT;
>
Did you test this? I think in.name is always true..

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 08/11] staging/android: make info->len return only the size of fence_infos
@ 2016-02-02 14:18     ` Maarten Lankhorst
  0 siblings, 0 replies; 35+ messages in thread
From: Maarten Lankhorst @ 2016-02-02 14:18 UTC (permalink / raw)
  To: Gustavo Padovan, Greg Kroah-Hartman
  Cc: devel, Daniel Stone, Daniel Vetter, Riley Andrews, dri-devel,
	linux-kernel, Arve Hjønnevåg, Gustavo Padovan,
	John Harrison

Op 02-02-16 om 14:23 schreef Gustavo Padovan:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> The len member of struct sync_file_info was returning the size of the whole
> buffer (struct sync_file_info + fence_infos at the of it). This commit
> change it to return only the size of the array of fence_infos.
>
> It also moves len to be right before the fences_infos struct.
>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
>  drivers/staging/android/sync.c      | 16 +++++++++++-----
>  drivers/staging/android/uapi/sync.h |  7 +++----
>  2 files changed, 14 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
> index ba7d461..e5fbf5a 100644
> --- a/drivers/staging/android/sync.c
> +++ b/drivers/staging/android/sync.c
> @@ -502,14 +502,19 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
>  static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
>  					unsigned long arg)
>  {
> -	struct sync_file_info *info;
> +	struct sync_file_info in, *info;
>  	__u32 size;
> -	__u32 len = 0;
> +	__u32 b_len, len = 0;
>  	int ret, i;
>  
> -	if (copy_from_user(&size, (void __user *)arg, sizeof(size)))
> +	if (copy_from_user(&in, (void __user *)arg, sizeof(*info)))
>  		return -EFAULT;
>  
> +	if (in.name || in.status || in.num_fences || in.fence_info)
> +		return -EFAULT;
>
Did you test this? I think in.name is always true..
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 02/11] staging/android: rename sync_pt_info to fence_info
  2016-02-02 13:23   ` Gustavo Padovan
  (?)
@ 2016-02-02 14:19   ` Maarten Lankhorst
  -1 siblings, 0 replies; 35+ messages in thread
From: Maarten Lankhorst @ 2016-02-02 14:19 UTC (permalink / raw)
  To: Gustavo Padovan, Greg Kroah-Hartman
  Cc: linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Gustavo Padovan

Op 02-02-16 om 14:23 schreef Gustavo Padovan:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> As struct sync_pt doesn't exist anymore it is a good idea remove any
> reference to it in the sync_framework. sync_pts were replaced directly by
> fences.
>
rename it to sync_fence_info to prevent polluting the global namespace? fence_info seems to be too generic.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 06/11] staging/android: turn fence_info into a __u64 pointer
  2016-02-02 13:23   ` Gustavo Padovan
  (?)
  (?)
@ 2016-02-02 15:28   ` Emil Velikov
  -1 siblings, 0 replies; 35+ messages in thread
From: Emil Velikov @ 2016-02-02 15:28 UTC (permalink / raw)
  To: Gustavo Padovan
  Cc: Greg Kroah-Hartman, devel, Daniel Stone, Daniel Vetter,
	Riley Andrews, ML dri-devel, Linux-Kernel@Vger. Kernel. Org,
	Arve Hjønnevåg, Gustavo Padovan, John Harrison

On 2 February 2016 at 15:23, Gustavo Padovan <gustavo@padovan.org> wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> Making fence_info a pointer enables us to extend the struct in the future
> without breaking the ABI.
>
> v2: use type __u64 for fence_info
>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
>  drivers/staging/android/sync.c      | 2 +-
>  drivers/staging/android/uapi/sync.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
> index f7530f0..03b1214 100644
> --- a/drivers/staging/android/sync.c
> +++ b/drivers/staging/android/sync.c
> @@ -525,7 +525,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
>         if (info->status >= 0)
>                 info->status = !info->status;
>
> -       len = sizeof(struct sync_file_info);
> +       len = sizeof(struct sync_file_info) - sizeof(__u64);
>
>         for (i = 0; i < sync_file->num_fences; ++i) {
>                 struct fence *fence = sync_file->cbs[i].fence;
> diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
> index ed281fc..8e2ed32 100644
> --- a/drivers/staging/android/uapi/sync.h
> +++ b/drivers/staging/android/uapi/sync.h
> @@ -54,7 +54,7 @@ struct sync_file_info {
>         char    name[32];
>         __s32   status;
>
> -       __u8    fence_info[0];
> +       __u64   fence_info;
Please update the description in the commit block at the top. As-is
things are very confusing :-)

-Emil

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 08/11] staging/android: make info->len return only the size of fence_infos
  2016-02-02 14:18     ` Maarten Lankhorst
@ 2016-02-02 18:46       ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 18:46 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: Greg Kroah-Hartman, linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Gustavo Padovan

2016-02-02 Maarten Lankhorst <maarten.lankhorst@linux.intel.com>:

> Op 02-02-16 om 14:23 schreef Gustavo Padovan:
> > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> >
> > The len member of struct sync_file_info was returning the size of the whole
> > buffer (struct sync_file_info + fence_infos at the of it). This commit
> > change it to return only the size of the array of fence_infos.
> >
> > It also moves len to be right before the fences_infos struct.
> >
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > ---
> >  drivers/staging/android/sync.c      | 16 +++++++++++-----
> >  drivers/staging/android/uapi/sync.h |  7 +++----
> >  2 files changed, 14 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
> > index ba7d461..e5fbf5a 100644
> > --- a/drivers/staging/android/sync.c
> > +++ b/drivers/staging/android/sync.c
> > @@ -502,14 +502,19 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
> >  static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
> >  					unsigned long arg)
> >  {
> > -	struct sync_file_info *info;
> > +	struct sync_file_info in, *info;
> >  	__u32 size;
> > -	__u32 len = 0;
> > +	__u32 b_len, len = 0;
> >  	int ret, i;
> >  
> > -	if (copy_from_user(&size, (void __user *)arg, sizeof(size)))
> > +	if (copy_from_user(&in, (void __user *)arg, sizeof(*info)))
> >  		return -EFAULT;
> >  
> > +	if (in.name || in.status || in.num_fences || in.fence_info)
> > +		return -EFAULT;
> >
> Did you test this? I think in.name is always true..

Ugh, no! These checks were last change I made so I think I forgot to
test them properly.

	Gustavo

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 08/11] staging/android: make info->len return only the size of fence_infos
@ 2016-02-02 18:46       ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 18:46 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: devel, Daniel Stone, Greg Kroah-Hartman, linux-kernel, dri-devel,
	Arve Hjønnevåg, Daniel Vetter, Riley Andrews,
	Gustavo Padovan, John Harrison

2016-02-02 Maarten Lankhorst <maarten.lankhorst@linux.intel.com>:

> Op 02-02-16 om 14:23 schreef Gustavo Padovan:
> > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> >
> > The len member of struct sync_file_info was returning the size of the whole
> > buffer (struct sync_file_info + fence_infos at the of it). This commit
> > change it to return only the size of the array of fence_infos.
> >
> > It also moves len to be right before the fences_infos struct.
> >
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > ---
> >  drivers/staging/android/sync.c      | 16 +++++++++++-----
> >  drivers/staging/android/uapi/sync.h |  7 +++----
> >  2 files changed, 14 insertions(+), 9 deletions(-)
> >
> > diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
> > index ba7d461..e5fbf5a 100644
> > --- a/drivers/staging/android/sync.c
> > +++ b/drivers/staging/android/sync.c
> > @@ -502,14 +502,19 @@ static int sync_fill_fence_info(struct fence *fence, void *data, int size)
> >  static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
> >  					unsigned long arg)
> >  {
> > -	struct sync_file_info *info;
> > +	struct sync_file_info in, *info;
> >  	__u32 size;
> > -	__u32 len = 0;
> > +	__u32 b_len, len = 0;
> >  	int ret, i;
> >  
> > -	if (copy_from_user(&size, (void __user *)arg, sizeof(size)))
> > +	if (copy_from_user(&in, (void __user *)arg, sizeof(*info)))
> >  		return -EFAULT;
> >  
> > +	if (in.name || in.status || in.num_fences || in.fence_info)
> > +		return -EFAULT;
> >
> Did you test this? I think in.name is always true..

Ugh, no! These checks were last change I made so I think I forgot to
test them properly.

	Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 06/11] staging/android: turn fence_info into a __u64 pointer
  2016-02-02 14:16     ` Maarten Lankhorst
@ 2016-02-02 20:28       ` Gustavo Padovan
  -1 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 20:28 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: Greg Kroah-Hartman, linux-kernel, devel, dri-devel, Daniel Stone,
	Arve Hjønnevåg, Riley Andrews, Daniel Vetter,
	Rob Clark, Greg Hackmann, John Harrison, Gustavo Padovan

Hi Maarten,

2016-02-02 Maarten Lankhorst <maarten.lankhorst@linux.intel.com>:

> Op 02-02-16 om 14:23 schreef Gustavo Padovan:
> > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> >
> > Making fence_info a pointer enables us to extend the struct in the future
> > without breaking the ABI.
> >
> > v2: use type __u64 for fence_info
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > ---
> >  drivers/staging/android/sync.c      | 2 +-
> >  drivers/staging/android/uapi/sync.h | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
> > index f7530f0..03b1214 100644
> > --- a/drivers/staging/android/sync.c
> > +++ b/drivers/staging/android/sync.c
> > @@ -525,7 +525,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
> >  	if (info->status >= 0)
> >  		info->status = !info->status;
> >  
> > -	len = sizeof(struct sync_file_info);
> > +	len = sizeof(struct sync_file_info) - sizeof(__u64);
> >  
> >  	for (i = 0; i < sync_file->num_fences; ++i) {
> >  		struct fence *fence = sync_file->cbs[i].fence;
> > diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
> > index ed281fc..8e2ed32 100644
> > --- a/drivers/staging/android/uapi/sync.h
> > +++ b/drivers/staging/android/uapi/sync.h
> > @@ -54,7 +54,7 @@ struct sync_file_info {
> >  	char	name[32];
> >  	__s32	status;
> >  
> > -	__u8	fence_info[0];
> > +	__u64	fence_info;
> >
> With the information from the commit I would expect fence_info would be a true pointer.

I missed that. It is fixed for v3 now.

> 
> so if (sync_file_info->num_fences == 0) not copying fence_info, but set all members including this one.
> else for_all_fences() copy_to_user(fence_info struct)
>
> Otherwise you still can't extend the struct without breaking the abi.

all sync_files have at least 1 fence so we are left to the else case,
coupy all fences to the user. So we always have variable length at the
end of the struct. But I still don't see how this will prevent us from
breaking the API.

	Gustavo

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 06/11] staging/android: turn fence_info into a __u64 pointer
@ 2016-02-02 20:28       ` Gustavo Padovan
  0 siblings, 0 replies; 35+ messages in thread
From: Gustavo Padovan @ 2016-02-02 20:28 UTC (permalink / raw)
  To: Maarten Lankhorst
  Cc: devel, Daniel Stone, Greg Kroah-Hartman, linux-kernel, dri-devel,
	Arve Hjønnevåg, Daniel Vetter, Riley Andrews,
	Gustavo Padovan, John Harrison

Hi Maarten,

2016-02-02 Maarten Lankhorst <maarten.lankhorst@linux.intel.com>:

> Op 02-02-16 om 14:23 schreef Gustavo Padovan:
> > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> >
> > Making fence_info a pointer enables us to extend the struct in the future
> > without breaking the ABI.
> >
> > v2: use type __u64 for fence_info
> > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > ---
> >  drivers/staging/android/sync.c      | 2 +-
> >  drivers/staging/android/uapi/sync.h | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
> > index f7530f0..03b1214 100644
> > --- a/drivers/staging/android/sync.c
> > +++ b/drivers/staging/android/sync.c
> > @@ -525,7 +525,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
> >  	if (info->status >= 0)
> >  		info->status = !info->status;
> >  
> > -	len = sizeof(struct sync_file_info);
> > +	len = sizeof(struct sync_file_info) - sizeof(__u64);
> >  
> >  	for (i = 0; i < sync_file->num_fences; ++i) {
> >  		struct fence *fence = sync_file->cbs[i].fence;
> > diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
> > index ed281fc..8e2ed32 100644
> > --- a/drivers/staging/android/uapi/sync.h
> > +++ b/drivers/staging/android/uapi/sync.h
> > @@ -54,7 +54,7 @@ struct sync_file_info {
> >  	char	name[32];
> >  	__s32	status;
> >  
> > -	__u8	fence_info[0];
> > +	__u64	fence_info;
> >
> With the information from the commit I would expect fence_info would be a true pointer.

I missed that. It is fixed for v3 now.

> 
> so if (sync_file_info->num_fences == 0) not copying fence_info, but set all members including this one.
> else for_all_fences() copy_to_user(fence_info struct)
>
> Otherwise you still can't extend the struct without breaking the abi.

all sync_files have at least 1 fence so we are left to the else case,
coupy all fences to the user. So we always have variable length at the
end of the struct. But I still don't see how this will prevent us from
breaking the API.

	Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 06/11] staging/android: turn fence_info into a __u64 pointer
  2016-02-02 20:28       ` Gustavo Padovan
@ 2016-02-03  8:32         ` Maarten Lankhorst
  -1 siblings, 0 replies; 35+ messages in thread
From: Maarten Lankhorst @ 2016-02-03  8:32 UTC (permalink / raw)
  To: Gustavo Padovan, Greg Kroah-Hartman, linux-kernel, devel,
	dri-devel, Daniel Stone, Arve Hjønnevåg, Riley Andrews,
	Daniel Vetter, Rob Clark, Greg Hackmann, John Harrison,
	Gustavo Padovan

Op 02-02-16 om 21:28 schreef Gustavo Padovan:
> Hi Maarten,
>
> 2016-02-02 Maarten Lankhorst <maarten.lankhorst@linux.intel.com>:
>
>> Op 02-02-16 om 14:23 schreef Gustavo Padovan:
>>> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>>>
>>> Making fence_info a pointer enables us to extend the struct in the future
>>> without breaking the ABI.
>>>
>>> v2: use type __u64 for fence_info
>>> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>>> ---
>>>  drivers/staging/android/sync.c      | 2 +-
>>>  drivers/staging/android/uapi/sync.h | 2 +-
>>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
>>> index f7530f0..03b1214 100644
>>> --- a/drivers/staging/android/sync.c
>>> +++ b/drivers/staging/android/sync.c
>>> @@ -525,7 +525,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
>>>  	if (info->status >= 0)
>>>  		info->status = !info->status;
>>>  
>>> -	len = sizeof(struct sync_file_info);
>>> +	len = sizeof(struct sync_file_info) - sizeof(__u64);
>>>  
>>>  	for (i = 0; i < sync_file->num_fences; ++i) {
>>>  		struct fence *fence = sync_file->cbs[i].fence;
>>> diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
>>> index ed281fc..8e2ed32 100644
>>> --- a/drivers/staging/android/uapi/sync.h
>>> +++ b/drivers/staging/android/uapi/sync.h
>>> @@ -54,7 +54,7 @@ struct sync_file_info {
>>>  	char	name[32];
>>>  	__s32	status;
>>>  
>>> -	__u8	fence_info[0];
>>> +	__u64	fence_info;
>>>
>> With the information from the commit I would expect fence_info would be a true pointer.
> I missed that. It is fixed for v3 now.
>
>> so if (sync_file_info->num_fences == 0) not copying fence_info, but set all members including this one.
>> else for_all_fences() copy_to_user(fence_info struct)
>>
>> Otherwise you still can't extend the struct without breaking the abi.
> all sync_files have at least 1 fence so we are left to the else case,
> coupy all fences to the user. So we always have variable length at the
> end of the struct. But I still don't see how this will prevent us from
> breaking the API.
Ok this was with fence_info not being a pointer. :)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH v2 06/11] staging/android: turn fence_info into a __u64 pointer
@ 2016-02-03  8:32         ` Maarten Lankhorst
  0 siblings, 0 replies; 35+ messages in thread
From: Maarten Lankhorst @ 2016-02-03  8:32 UTC (permalink / raw)
  To: Gustavo Padovan, Greg Kroah-Hartman, linux-kernel, devel,
	dri-devel, Daniel Stone, Arve Hjønnevåg, Riley Andrews,
	Daniel Vetter, Rob Clark, Greg Hackmann, John Harrison,
	Gustavo Padovan

Op 02-02-16 om 21:28 schreef Gustavo Padovan:
> Hi Maarten,
>
> 2016-02-02 Maarten Lankhorst <maarten.lankhorst@linux.intel.com>:
>
>> Op 02-02-16 om 14:23 schreef Gustavo Padovan:
>>> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>>>
>>> Making fence_info a pointer enables us to extend the struct in the future
>>> without breaking the ABI.
>>>
>>> v2: use type __u64 for fence_info
>>> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>>> ---
>>>  drivers/staging/android/sync.c      | 2 +-
>>>  drivers/staging/android/uapi/sync.h | 2 +-
>>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c
>>> index f7530f0..03b1214 100644
>>> --- a/drivers/staging/android/sync.c
>>> +++ b/drivers/staging/android/sync.c
>>> @@ -525,7 +525,7 @@ static long sync_file_ioctl_fence_info(struct sync_file *sync_file,
>>>  	if (info->status >= 0)
>>>  		info->status = !info->status;
>>>  
>>> -	len = sizeof(struct sync_file_info);
>>> +	len = sizeof(struct sync_file_info) - sizeof(__u64);
>>>  
>>>  	for (i = 0; i < sync_file->num_fences; ++i) {
>>>  		struct fence *fence = sync_file->cbs[i].fence;
>>> diff --git a/drivers/staging/android/uapi/sync.h b/drivers/staging/android/uapi/sync.h
>>> index ed281fc..8e2ed32 100644
>>> --- a/drivers/staging/android/uapi/sync.h
>>> +++ b/drivers/staging/android/uapi/sync.h
>>> @@ -54,7 +54,7 @@ struct sync_file_info {
>>>  	char	name[32];
>>>  	__s32	status;
>>>  
>>> -	__u8	fence_info[0];
>>> +	__u64	fence_info;
>>>
>> With the information from the commit I would expect fence_info would be a true pointer.
> I missed that. It is fixed for v3 now.
>
>> so if (sync_file_info->num_fences == 0) not copying fence_info, but set all members including this one.
>> else for_all_fences() copy_to_user(fence_info struct)
>>
>> Otherwise you still can't extend the struct without breaking the abi.
> all sync_files have at least 1 fence so we are left to the else case,
> coupy all fences to the user. So we always have variable length at the
> end of the struct. But I still don't see how this will prevent us from
> breaking the API.
Ok this was with fence_info not being a pointer. :)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2016-02-03  8:32 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-02 13:23 [PATCH v2 00/11] android sync framework: clean up IOCTLs and ABI Gustavo Padovan
2016-02-02 13:23 ` Gustavo Padovan
2016-02-02 13:23 ` [PATCH v2 01/11] staging/android: remove SYNC_WAIT ioctl Gustavo Padovan
2016-02-02 13:23   ` Gustavo Padovan
2016-02-02 13:23 ` [PATCH v2 02/11] staging/android: rename sync_pt_info to fence_info Gustavo Padovan
2016-02-02 13:23   ` Gustavo Padovan
2016-02-02 14:19   ` Maarten Lankhorst
2016-02-02 13:23 ` [PATCH v2 03/11] staging/android: rename sync_file_info_data to sync_file_info Gustavo Padovan
2016-02-02 13:23   ` Gustavo Padovan
2016-02-02 13:23 ` [PATCH v2 04/11] staging/android: remove driver_data from struct fence_info Gustavo Padovan
2016-02-02 13:23   ` Gustavo Padovan
2016-02-02 13:23 ` [PATCH v2 05/11] staging/android: remove len field " Gustavo Padovan
2016-02-02 13:23   ` Gustavo Padovan
2016-02-02 13:23 ` [PATCH v2 06/11] staging/android: turn fence_info into a __u64 pointer Gustavo Padovan
2016-02-02 13:23   ` Gustavo Padovan
2016-02-02 14:16   ` Maarten Lankhorst
2016-02-02 14:16     ` Maarten Lankhorst
2016-02-02 20:28     ` Gustavo Padovan
2016-02-02 20:28       ` Gustavo Padovan
2016-02-03  8:32       ` Maarten Lankhorst
2016-02-03  8:32         ` Maarten Lankhorst
2016-02-02 15:28   ` Emil Velikov
2016-02-02 13:23 ` [PATCH v2 07/11] staging/android: add num_fences field to struct sync_file_info Gustavo Padovan
2016-02-02 13:23 ` [PATCH v2 08/11] staging/android: make info->len return only the size of fence_infos Gustavo Padovan
2016-02-02 13:23   ` Gustavo Padovan
2016-02-02 14:18   ` Maarten Lankhorst
2016-02-02 14:18     ` Maarten Lankhorst
2016-02-02 18:46     ` Gustavo Padovan
2016-02-02 18:46       ` Gustavo Padovan
2016-02-02 13:23 ` [PATCH v2 09/11] staging/android: rename SYNC_IOC_FENCE_INFO Gustavo Padovan
2016-02-02 13:23   ` Gustavo Padovan
2016-02-02 13:23 ` [PATCH v2 10/11] staging/android: add flags member to sync ioctl structs Gustavo Padovan
2016-02-02 13:23   ` Gustavo Padovan
2016-02-02 13:23 ` [PATCH v2 11/11] staging/android: remove redundant comments on sync_merge_data Gustavo Padovan
2016-02-02 13:23   ` Gustavo Padovan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.