Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1460604 > unrolled thread
| Started by | Gustavo Padovan <gustavo@padovan.org> |
|---|---|
| First post | 2016-08-11 17:30 +0200 |
| Last post | 2016-08-18 14:10 +0200 |
| Articles | 5 — 4 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 4/5] staging/android: add Doc for SW_SYNC ioctl interface Gustavo Padovan <gustavo@padovan.org> - 2016-08-11 17:30 +0200
Re: [PATCH v3 4/5] staging/android: add Doc for SW_SYNC ioctl interface Eric Engestrom <eric.engestrom@imgtec.com> - 2016-08-11 17:50 +0200
Re: [PATCH v3 4/5] staging/android: add Doc for SW_SYNC ioctl interface Gustavo Padovan <gustavo.padovan@collabora.com> - 2016-08-11 18:50 +0200
[PATCH] staging/android: add Doc for SW_SYNC ioctl interface Gustavo Padovan <gustavo@padovan.org> - 2016-08-11 18:50 +0200
Re: [PATCH] staging/android: add Doc for SW_SYNC ioctl interface Pavel Machek <pavel@ucw.cz> - 2016-08-18 14:10 +0200
| From | Gustavo Padovan <gustavo@padovan.org> |
|---|---|
| Date | 2016-08-11 17:30 +0200 |
| Subject | [PATCH v3 4/5] staging/android: add Doc for SW_SYNC ioctl interface |
| Message-ID | <s505H-5ym-1@gated-at.bofh.it> |
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This interface is hidden from kernel headers and it is intended for use
only for testing. So testers would have to add the ioctl information
internally. This is to prevent misuse of this feature.
v2: take in Eric suggestions for the Documentation
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
drivers/staging/android/sw_sync.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c
index 039e1f4..498ab55 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -25,6 +25,36 @@
#define CREATE_TRACE_POINTS
#include "sync_trace.h"
+/*
+ * SW SYNC validation framework
+ *
+ * A sync object driver that uses a 32bit counter to coordinate
+ * synchronization. Useful when there is no hardware primitive backing
+ * the synchronization.
+ *
+ * To start the framework just open:
+ *
+ * <debugfs>/sync/sw_sync
+ *
+ * That will create a sync timeline, all fences created under this timeline
+ * file descriptor will belong to the this timeline.
+ *
+ * The 'sw_sync' file can be opened many times as to create different
+ * timelines.
+ *
+ * Fences can be created with SW_SYNC_IOC_CREATE_FENCE ioctl with struct
+ * sw_sync_ioctl_create_fence as parameter.
+ *
+ * To increment the timeline counter, SW_SYNC_IOC_INC ioctl should be used
+ * with the increment as u32. This will update the last signaled value
+ * from the timeline and signal any fence that has seqno smaller of equal
+ * it.
+ *
+ * struct sw_sync_ioctl_create_fence
+ * @value: the seqno to initialise the fence with
+ * @name: the name of the new sync point
+ * @fence: return the fd of the new sync_file with the created fence
+ */
struct sw_sync_create_fence_data {
__u32 value;
char name[32];
@@ -35,6 +65,7 @@ struct sw_sync_create_fence_data {
#define SW_SYNC_IOC_CREATE_FENCE _IOWR(SW_SYNC_IOC_MAGIC, 0,\
struct sw_sync_create_fence_data)
+
#define SW_SYNC_IOC_INC _IOW(SW_SYNC_IOC_MAGIC, 1, __u32)
static const struct fence_ops timeline_fence_ops;
--
2.5.5
[toc] | [next] | [standalone]
| From | Eric Engestrom <eric.engestrom@imgtec.com> |
|---|---|
| Date | 2016-08-11 17:50 +0200 |
| Subject | Re: [PATCH v3 4/5] staging/android: add Doc for SW_SYNC ioctl interface |
| Message-ID | <s50p3-5GR-1@gated-at.bofh.it> |
| In reply to | #1460604 |
On Thu, Aug 11, 2016 at 12:26:43PM -0300, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
>
> This interface is hidden from kernel headers and it is intended for use
> only for testing. So testers would have to add the ioctl information
> internally. This is to prevent misuse of this feature.
>
> v2: take in Eric suggestions for the Documentation
>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
> ---
> drivers/staging/android/sw_sync.c | 31 +++++++++++++++++++++++++++++++
> 1 file changed, 31 insertions(+)
>
> diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c
> index 039e1f4..498ab55 100644
> --- a/drivers/staging/android/sw_sync.c
> +++ b/drivers/staging/android/sw_sync.c
> @@ -25,6 +25,36 @@
> #define CREATE_TRACE_POINTS
> #include "sync_trace.h"
>
> +/*
> + * SW SYNC validation framework
> + *
> + * A sync object driver that uses a 32bit counter to coordinate
> + * synchronization. Useful when there is no hardware primitive backing
> + * the synchronization.
> + *
> + * To start the framework just open:
> + *
> + * <debugfs>/sync/sw_sync
> + *
> + * That will create a sync timeline, all fences created under this timeline
> + * file descriptor will belong to the this timeline.
> + *
> + * The 'sw_sync' file can be opened many times as to create different
> + * timelines.
> + *
> + * Fences can be created with SW_SYNC_IOC_CREATE_FENCE ioctl with struct
> + * sw_sync_ioctl_create_fence as parameter.
> + *
> + * To increment the timeline counter, SW_SYNC_IOC_INC ioctl should be used
> + * with the increment as u32. This will update the last signaled value
> + * from the timeline and signal any fence that has seqno smaller of equal
> + * it.
You didn't fix all of it: "that has a seqno smaller or equal to it."
Missing "a" (just noticed), s/of/or/, and missing "to" :)
Cheers,
Eric
> + *
> + * struct sw_sync_ioctl_create_fence
> + * @value: the seqno to initialise the fence with
> + * @name: the name of the new sync point
> + * @fence: return the fd of the new sync_file with the created fence
> + */
> struct sw_sync_create_fence_data {
> __u32 value;
> char name[32];
> @@ -35,6 +65,7 @@ struct sw_sync_create_fence_data {
>
> #define SW_SYNC_IOC_CREATE_FENCE _IOWR(SW_SYNC_IOC_MAGIC, 0,\
> struct sw_sync_create_fence_data)
> +
> #define SW_SYNC_IOC_INC _IOW(SW_SYNC_IOC_MAGIC, 1, __u32)
>
> static const struct fence_ops timeline_fence_ops;
> --
> 2.5.5
>
[toc] | [prev] | [next] | [standalone]
| From | Gustavo Padovan <gustavo.padovan@collabora.com> |
|---|---|
| Date | 2016-08-11 18:50 +0200 |
| Subject | Re: [PATCH v3 4/5] staging/android: add Doc for SW_SYNC ioctl interface |
| Message-ID | <s51l8-6jV-41@gated-at.bofh.it> |
| In reply to | #1460624 |
2016-08-11 Eric Engestrom <eric.engestrom@imgtec.com>: > On Thu, Aug 11, 2016 at 12:26:43PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk> > > > > This interface is hidden from kernel headers and it is intended for use > > only for testing. So testers would have to add the ioctl information > > internally. This is to prevent misuse of this feature. > > > > v2: take in Eric suggestions for the Documentation > > > > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> > > Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> > > --- > > drivers/staging/android/sw_sync.c | 31 +++++++++++++++++++++++++++++++ > > 1 file changed, 31 insertions(+) > > > > diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c > > index 039e1f4..498ab55 100644 > > --- a/drivers/staging/android/sw_sync.c > > +++ b/drivers/staging/android/sw_sync.c > > @@ -25,6 +25,36 @@ > > #define CREATE_TRACE_POINTS > > #include "sync_trace.h" > > > > +/* > > + * SW SYNC validation framework > > + * > > + * A sync object driver that uses a 32bit counter to coordinate > > + * synchronization. Useful when there is no hardware primitive backing > > + * the synchronization. > > + * > > + * To start the framework just open: > > + * > > + * <debugfs>/sync/sw_sync > > + * > > + * That will create a sync timeline, all fences created under this timeline > > + * file descriptor will belong to the this timeline. > > + * > > + * The 'sw_sync' file can be opened many times as to create different > > + * timelines. > > + * > > + * Fences can be created with SW_SYNC_IOC_CREATE_FENCE ioctl with struct > > + * sw_sync_ioctl_create_fence as parameter. > > + * > > + * To increment the timeline counter, SW_SYNC_IOC_INC ioctl should be used > > + * with the increment as u32. This will update the last signaled value > > + * from the timeline and signal any fence that has seqno smaller of equal > > + * it. > > You didn't fix all of it: "that has a seqno smaller or equal to it." > Missing "a" (just noticed), s/of/or/, and missing "to" :) Oh. Right. I didn't pay attention to all your fixes in that phrase. Thanks. I'll send an updated patch.
[toc] | [prev] | [next] | [standalone]
| From | Gustavo Padovan <gustavo@padovan.org> |
|---|---|
| Date | 2016-08-11 18:50 +0200 |
| Subject | [PATCH] staging/android: add Doc for SW_SYNC ioctl interface |
| Message-ID | <s51l8-6jV-37@gated-at.bofh.it> |
| In reply to | #1460604 |
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This interface is hidden from kernel headers and it is intended for use
only for testing. So testers would have to add the ioctl information
internally. This is to prevent misuse of this feature.
v2: take in Eric suggestions for the Documentation
v3: really take in Eric suggestions
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
drivers/staging/android/sw_sync.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c
index 039e1f4..62e8e6d 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -25,6 +25,36 @@
#define CREATE_TRACE_POINTS
#include "sync_trace.h"
+/*
+ * SW SYNC validation framework
+ *
+ * A sync object driver that uses a 32bit counter to coordinate
+ * synchronization. Useful when there is no hardware primitive backing
+ * the synchronization.
+ *
+ * To start the framework just open:
+ *
+ * <debugfs>/sync/sw_sync
+ *
+ * That will create a sync timeline, all fences created under this timeline
+ * file descriptor will belong to the this timeline.
+ *
+ * The 'sw_sync' file can be opened many times as to create different
+ * timelines.
+ *
+ * Fences can be created with SW_SYNC_IOC_CREATE_FENCE ioctl with struct
+ * sw_sync_ioctl_create_fence as parameter.
+ *
+ * To increment the timeline counter, SW_SYNC_IOC_INC ioctl should be used
+ * with the increment as u32. This will update the last signaled value
+ * from the timeline and signal any fence that has a seqno smaller or equal
+ * to it.
+ *
+ * struct sw_sync_ioctl_create_fence
+ * @value: the seqno to initialise the fence with
+ * @name: the name of the new sync point
+ * @fence: return the fd of the new sync_file with the created fence
+ */
struct sw_sync_create_fence_data {
__u32 value;
char name[32];
@@ -35,6 +65,7 @@ struct sw_sync_create_fence_data {
#define SW_SYNC_IOC_CREATE_FENCE _IOWR(SW_SYNC_IOC_MAGIC, 0,\
struct sw_sync_create_fence_data)
+
#define SW_SYNC_IOC_INC _IOW(SW_SYNC_IOC_MAGIC, 1, __u32)
static const struct fence_ops timeline_fence_ops;
--
2.5.5
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2016-08-18 14:10 +0200 |
| Subject | Re: [PATCH] staging/android: add Doc for SW_SYNC ioctl interface |
| Message-ID | <s7uiZ-82P-13@gated-at.bofh.it> |
| In reply to | #1460693 |
On Thu 2016-08-11 13:45:53, Gustavo Padovan wrote: > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk> > > This interface is hidden from kernel headers and it is intended for use > only for testing. So testers would have to add the ioctl information > internally. This is to prevent misuse of this feature. > > v2: take in Eric suggestions for the Documentation > > v3: really take in Eric suggestions > > Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> > Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Acked-by: Pavel Machek <pavel@ucw.cz> -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web