From: Gustavo Padovan <gustavo@padovan.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org,
"Daniel Stone" <daniels@collabora.com>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Riley Andrews" <riandrews@android.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
"Arve Hjønnevåg" <arve@android.com>,
"Gustavo Padovan" <gustavo.padovan@collabora.co.uk>,
"John Harrison" <John.C.Harrison@Intel.com>
Subject: [PATCH v2 06/11] staging/android: remove sw_sync_timeline and sw_sync_pt
Date: Wed, 27 Jan 2016 11:30:34 -0200 [thread overview]
Message-ID: <1453901439-19467-7-git-send-email-gustavo@padovan.org> (raw)
In-Reply-To: <1453901439-19467-1-git-send-email-gustavo@padovan.org>
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
As we moved value storage to sync_timeline and fence those two structs
became useless and can be removed now.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
drivers/staging/android/sw_sync.c | 24 +++++++-----------------
drivers/staging/android/sw_sync.h | 24 ++++++------------------
drivers/staging/android/sync_debug.c | 12 ++++++------
3 files changed, 19 insertions(+), 41 deletions(-)
diff --git a/drivers/staging/android/sw_sync.c b/drivers/staging/android/sw_sync.c
index c5e92c6..461dbd9 100644
--- a/drivers/staging/android/sw_sync.c
+++ b/drivers/staging/android/sw_sync.c
@@ -25,31 +25,21 @@
#include "sw_sync.h"
-struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value)
+struct fence *sw_sync_pt_create(struct sync_timeline *obj, u32 value)
{
- struct sw_sync_pt *pt;
-
- pt = (struct sw_sync_pt *)
- sync_pt_create(&obj->obj, sizeof(struct sw_sync_pt), value);
-
- pt->value = value;
-
- return (struct fence *)pt;
+ return sync_pt_create(obj, sizeof(struct fence), value);
}
EXPORT_SYMBOL(sw_sync_pt_create);
-struct sw_sync_timeline *sw_sync_timeline_create(const char *name)
+struct sync_timeline *sw_sync_timeline_create(const char *name)
{
- struct sw_sync_timeline *obj = (struct sw_sync_timeline *)
- sync_timeline_create(sizeof(struct sw_sync_timeline),
- "sw_sync", name);
-
- return obj;
+ return sync_timeline_create(sizeof(struct sync_timeline),
+ "sw_sync", name);
}
EXPORT_SYMBOL(sw_sync_timeline_create);
-void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)
+void sw_sync_timeline_inc(struct sync_timeline *obj, u32 inc)
{
- sync_timeline_signal(&obj->obj, inc);
+ sync_timeline_signal(obj, inc);
}
EXPORT_SYMBOL(sw_sync_timeline_inc);
diff --git a/drivers/staging/android/sw_sync.h b/drivers/staging/android/sw_sync.h
index e18667b..9f26c62 100644
--- a/drivers/staging/android/sw_sync.h
+++ b/drivers/staging/android/sw_sync.h
@@ -22,34 +22,22 @@
#include "sync.h"
#include "uapi/sw_sync.h"
-struct sw_sync_timeline {
- struct sync_timeline obj;
-
- u32 value;
-};
-
-struct sw_sync_pt {
- struct fence pt;
-
- u32 value;
-};
-
#if IS_ENABLED(CONFIG_SW_SYNC)
-struct sw_sync_timeline *sw_sync_timeline_create(const char *name);
-void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc);
+struct sync_timeline *sw_sync_timeline_create(const char *name);
+void sw_sync_timeline_inc(struct sync_timeline *obj, u32 inc);
-struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value);
+struct fence *sw_sync_pt_create(struct sync_timeline *obj, u32 value);
#else
-static inline struct sw_sync_timeline *sw_sync_timeline_create(const char *name)
+static inline struct sync_timeline *sw_sync_timeline_create(const char *name)
{
return NULL;
}
-static inline void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)
+static inline void sw_sync_timeline_inc(struct sync_timeline *obj, u32 inc)
{
}
-static inline struct fence *sw_sync_pt_create(struct sw_sync_timeline *obj,
+static inline struct fence *sw_sync_pt_create(struct sync_timeline *obj,
u32 value)
{
return NULL;
diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c
index 26ba9e86..e984955 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -211,7 +211,7 @@ static const struct file_operations sync_info_debugfs_fops = {
/* opening sw_sync create a new sync obj */
static int sw_sync_debugfs_open(struct inode *inode, struct file *file)
{
- struct sw_sync_timeline *obj;
+ struct sync_timeline *obj;
char task_comm[TASK_COMM_LEN];
get_task_comm(task_comm, current);
@@ -227,13 +227,13 @@ static int sw_sync_debugfs_open(struct inode *inode, struct file *file)
static int sw_sync_debugfs_release(struct inode *inode, struct file *file)
{
- struct sw_sync_timeline *obj = file->private_data;
+ struct sync_timeline *obj = file->private_data;
- sync_timeline_destroy(&obj->obj);
+ sync_timeline_destroy(obj);
return 0;
}
-static long sw_sync_ioctl_create_fence(struct sw_sync_timeline *obj,
+static long sw_sync_ioctl_create_fence(struct sync_timeline *obj,
unsigned long arg)
{
int fd = get_unused_fd_flags(O_CLOEXEC);
@@ -280,7 +280,7 @@ err:
return err;
}
-static long sw_sync_ioctl_inc(struct sw_sync_timeline *obj, unsigned long arg)
+static long sw_sync_ioctl_inc(struct sync_timeline *obj, unsigned long arg)
{
u32 value;
@@ -295,7 +295,7 @@ static long sw_sync_ioctl_inc(struct sw_sync_timeline *obj, unsigned long arg)
static long sw_sync_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
- struct sw_sync_timeline *obj = file->private_data;
+ struct sync_timeline *obj = file->private_data;
switch (cmd) {
case SW_SYNC_IOC_CREATE_FENCE:
--
2.5.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-01-27 13:31 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-27 13:30 [PATCH v2 00/11] sync framework de-staging: part 2 - de-stage Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 01/11] dma-buf/sync_file: de-stage sync_file Gustavo Padovan
2016-01-27 14:31 ` Maarten Lankhorst
2016-01-27 17:03 ` Gustavo Padovan
2016-01-27 18:17 ` Emil Velikov
2016-01-27 20:25 ` Gustavo Padovan
2016-01-27 21:41 ` Greg Hackmann
2016-01-28 9:23 ` Daniel Vetter
2016-01-29 17:46 ` Greg Hackmann
2016-01-27 13:30 ` [PATCH v2 02/11] staging/android: store last signaled value on sync timeline Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 03/11] staging/android: remove .fill_driver_data() timeline ops Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 04/11] staging/android: remove .{fence, timeline}_value_str() from timeline_ops Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 05/11] staging/android: remove struct sync_timeline_ops Gustavo Padovan
2016-01-27 13:30 ` Gustavo Padovan [this message]
2016-01-27 13:30 ` [PATCH v2 07/11] staging/android: remove sw_sync.[ch] files Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 08/11] staging/android: rename android_fence to timeline_fence Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 09/11] dma-buf/sync_timeline: de-stage sync_timeline Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 10/11] dma-buf/sync_file: bring debug back to sync file Gustavo Padovan
2016-01-27 13:30 ` [PATCH v2 11/11] dma-buf/sync_file: bring sync_dump() back Gustavo Padovan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1453901439-19467-7-git-send-email-gustavo@padovan.org \
--to=gustavo@padovan.org \
--cc=John.C.Harrison@Intel.com \
--cc=arve@android.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniels@collabora.com \
--cc=devel@driverdev.osuosl.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=riandrews@android.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).