From: Gustavo Padovan <gustavo@padovan.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
dri-devel@lists.freedesktop.org,
"Daniel Stone" <daniels@collabora.com>,
"Arve Hjønnevåg" <arve@android.com>,
"Riley Andrews" <riandrews@android.com>,
"Daniel Vetter" <daniel.vetter@ffwll.ch>,
"Rob Clark" <robdclark@gmail.com>,
"Greg Hackmann" <ghackmann@google.com>,
"John Harrison" <John.C.Harrison@Intel.com>,
"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
"Sumit Semwal" <sumit.semwal@linaro.org>,
"Gustavo Padovan" <gustavo.padovan@collabora.co.uk>
Subject: [PATCH 6/7] dma-buf/sw_sync: de-stage SW_SYNC
Date: Mon, 20 Jun 2016 12:53:12 -0300 [thread overview]
Message-ID: <1466437993-21573-7-git-send-email-gustavo@padovan.org> (raw)
In-Reply-To: <1466437993-21573-1-git-send-email-gustavo@padovan.org>
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
SW_SYNC allows to run tests on the sync_file framework via debugfs on
<debugfs>/sync/sw_sync
Opening and closing the file triggers creation and release of a sync
timeline. To create fences on this timeline the SW_SYNC_IOC_CREATE_FENCE
ioctl should be used. To increment the timeline value use SW_SYNC_IOC_INC.
Also it exports Sync information on
<debugfs>/sync/info
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
drivers/dma-buf/Kconfig | 14 ++++++++++++++
drivers/dma-buf/Makefile | 1 +
drivers/{staging/android => dma-buf}/sw_sync.c | 0
drivers/{staging/android => dma-buf}/sync_debug.c | 0
drivers/{staging/android => dma-buf}/sync_debug.h | 0
drivers/{staging/android => dma-buf}/sync_trace.h | 2 +-
drivers/staging/android/Kconfig | 13 -------------
drivers/staging/android/Makefile | 1 -
8 files changed, 16 insertions(+), 15 deletions(-)
rename drivers/{staging/android => dma-buf}/sw_sync.c (100%)
rename drivers/{staging/android => dma-buf}/sync_debug.c (100%)
rename drivers/{staging/android => dma-buf}/sync_debug.h (100%)
rename drivers/{staging/android => dma-buf}/sync_trace.h (92%)
diff --git a/drivers/dma-buf/Kconfig b/drivers/dma-buf/Kconfig
index 9824bc4..7227022 100644
--- a/drivers/dma-buf/Kconfig
+++ b/drivers/dma-buf/Kconfig
@@ -8,4 +8,18 @@ config SYNC_FILE
---help---
This option enables the fence framework synchronization to export
sync_files to userspace that can represent one or more fences.
+
+config SW_SYNC
+ bool "Sync File Validation Framework"
+ default n
+ depends on SYNC_FILE
+ depends on DEBUG_FS
+ ---help---
+ A sync object driver that uses a 32bit counter to coordinate
+ synchronization. Useful when there is no hardware primitive backing
+ the synchronization.
+
+ WARNING: improper use of this can result in deadlocking kernel
+ drivers from userspace. Intended for test and debug only.
+
endmenu
diff --git a/drivers/dma-buf/Makefile b/drivers/dma-buf/Makefile
index 4a424ec..d2d02fc 100644
--- a/drivers/dma-buf/Makefile
+++ b/drivers/dma-buf/Makefile
@@ -1,2 +1,3 @@
obj-y := dma-buf.o fence.o reservation.o seqno-fence.o
obj-$(CONFIG_SYNC_FILE) += sync_file.o
+obj-$(CONFIG_SW_SYNC) += sw_sync.o sync_debug.o
diff --git a/drivers/staging/android/sw_sync.c b/drivers/dma-buf/sw_sync.c
similarity index 100%
rename from drivers/staging/android/sw_sync.c
rename to drivers/dma-buf/sw_sync.c
diff --git a/drivers/staging/android/sync_debug.c b/drivers/dma-buf/sync_debug.c
similarity index 100%
rename from drivers/staging/android/sync_debug.c
rename to drivers/dma-buf/sync_debug.c
diff --git a/drivers/staging/android/sync_debug.h b/drivers/dma-buf/sync_debug.h
similarity index 100%
rename from drivers/staging/android/sync_debug.h
rename to drivers/dma-buf/sync_debug.h
diff --git a/drivers/staging/android/sync_trace.h b/drivers/dma-buf/sync_trace.h
similarity index 92%
rename from drivers/staging/android/sync_trace.h
rename to drivers/dma-buf/sync_trace.h
index ea485f7..d13d59f 100644
--- a/drivers/staging/android/sync_trace.h
+++ b/drivers/dma-buf/sync_trace.h
@@ -1,5 +1,5 @@
#undef TRACE_SYSTEM
-#define TRACE_INCLUDE_PATH ../../drivers/staging/android
+#define TRACE_INCLUDE_PATH ../../drivers/dma-buf
#define TRACE_SYSTEM sync_trace
#if !defined(_TRACE_SYNC_H) || defined(TRACE_HEADER_MULTI_READ)
diff --git a/drivers/staging/android/Kconfig b/drivers/staging/android/Kconfig
index 06e41d2..6c00d6f 100644
--- a/drivers/staging/android/Kconfig
+++ b/drivers/staging/android/Kconfig
@@ -24,19 +24,6 @@ config ANDROID_LOW_MEMORY_KILLER
scripts (/init.rc), and it defines priority values with minimum free memory size
for each priority.
-config SW_SYNC
- bool "Software synchronization framework"
- default n
- depends on SYNC_FILE
- depends on DEBUG_FS
- ---help---
- A sync object driver that uses a 32bit counter to coordinate
- synchronization. Useful when there is no hardware primitive backing
- the synchronization.
-
- WARNING: improper use of this can result in deadlocking kernel
- drivers from userspace. Intended for test and debug only.
-
source "drivers/staging/android/ion/Kconfig"
endif # if ANDROID
diff --git a/drivers/staging/android/Makefile b/drivers/staging/android/Makefile
index 7ca61b7..7ed1be7 100644
--- a/drivers/staging/android/Makefile
+++ b/drivers/staging/android/Makefile
@@ -4,4 +4,3 @@ obj-y += ion/
obj-$(CONFIG_ASHMEM) += ashmem.o
obj-$(CONFIG_ANDROID_LOW_MEMORY_KILLER) += lowmemorykiller.o
-obj-$(CONFIG_SW_SYNC) += sw_sync.o sync_debug.o
--
2.5.5
next prev parent reply other threads:[~2016-06-20 15:55 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 15:53 [PATCH 0/7] de-stage SW_SYNC validation frawework Gustavo Padovan
2016-06-20 15:53 ` [PATCH 1/7] staging/android: remove doc from sw_sync Gustavo Padovan
2016-06-20 15:53 ` [PATCH 2/7] staging/android: display sync_pt name on debugfs Gustavo Padovan
2016-08-08 9:34 ` Maarten Lankhorst
2016-08-08 19:59 ` Gustavo Padovan
2016-08-09 10:04 ` Maarten Lankhorst
2016-08-09 14:45 ` Gustavo Padovan
2016-06-20 15:53 ` [PATCH 3/7] staging/android: do not let userspace trigger WARN_ON Gustavo Padovan
2016-06-20 15:53 ` [PATCH 4/7] staging/android: move trace/sync.h to sync_trace.h Gustavo Padovan
2016-06-20 15:53 ` [PATCH 5/7] staging/android: prepare sw_sync files for de-staging Gustavo Padovan
2016-06-20 16:09 ` Joe Perches
2016-06-20 16:16 ` Gustavo Padovan
2016-06-22 20:33 ` [PATCH v2] " Gustavo Padovan
2016-06-20 15:53 ` Gustavo Padovan [this message]
2016-06-20 15:53 ` [PATCH 7/7] staging/android: remove sync framework TODO Gustavo Padovan
2016-06-22 23:46 ` Emil Velikov
2016-06-23 13:33 ` Gustavo Padovan
2016-06-26 21:45 ` [PATCH 0/7] de-stage SW_SYNC validation frawework Pavel Machek
2016-07-07 19:39 ` Gustavo Padovan
2016-07-18 19:12 ` Gustavo Padovan
2016-07-24 22:21 ` Greg Kroah-Hartman
2016-08-07 21:51 ` Pavel Machek
2016-08-08 19:08 ` Gustavo Padovan
2016-07-24 15:00 ` Pavel Machek
2016-08-08 19:53 ` Gustavo Padovan
2016-08-09 6:04 ` Daniel Vetter
2016-08-10 20:53 ` Pavel Machek
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=1466437993-21573-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=ghackmann@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=gustavo.padovan@collabora.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=riandrews@android.com \
--cc=robdclark@gmail.com \
--cc=sumit.semwal@linaro.org \
/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
all inboxes | Powered by JetHome®