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>,
pavel@ucw.cz, eric.engestrom@imgtec.com
Subject: [PATCH v3 5/5] dma-buf/sw_sync: de-stage SW_SYNC
Date: Thu, 11 Aug 2016 12:26:44 -0300 [thread overview]
Message-ID: <1470929204-13237-6-git-send-email-gustavo@padovan.org> (raw)
In-Reply-To: <1470929204-13237-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>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
---
drivers/dma-buf/Kconfig | 13 +++++++++++++
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, 15 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 25bcfa0..2585821 100644
--- a/drivers/dma-buf/Kconfig
+++ b/drivers/dma-buf/Kconfig
@@ -17,4 +17,17 @@ config SYNC_FILE
Files fds, to the DRM driver for example. More details at
Documentation/sync_file.txt.
+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 f353db2..210a10b 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 fence-array.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
prev parent reply other threads:[~2016-08-11 15:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-11 15:26 [PATCH v3 0/5] de-stage SW_SYNC validation frawework Gustavo Padovan
2016-08-11 15:26 ` [PATCH v3 1/5] staging/android: do not let userspace trigger WARN_ON Gustavo Padovan
2016-08-11 15:26 ` [PATCH v3 2/5] staging/android: move trace/sync.h to sync_trace.h Gustavo Padovan
2016-08-11 15:26 ` [PATCH v3 3/5] staging/android: prepare sw_sync files for de-staging Gustavo Padovan
2016-08-11 15:26 ` [PATCH v3 4/5] staging/android: add Doc for SW_SYNC ioctl interface Gustavo Padovan
2016-08-11 15:39 ` Eric Engestrom
2016-08-11 16:41 ` Gustavo Padovan
2016-08-11 16:45 ` [PATCH] " Gustavo Padovan
2016-08-18 12:07 ` Pavel Machek
2016-08-11 15:26 ` Gustavo Padovan [this message]
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=1470929204-13237-6-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=eric.engestrom@imgtec.com \
--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=pavel@ucw.cz \
--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®