summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/sw_sync.c
Commit message (Collapse)AuthorAgeFilesLines
* drivers/staging: make android sw_sync.c explicitly non-modularPaul Gortmaker2015-10-131-9/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | The Kconfig currently controlling compilation of this code is: staging/android/Kconfig:config SW_SYNC staging/android/Kconfig: bool "Software synchronization objects" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. Since module_init translates to device_initcall in the non-modular case, the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: "Arve Hjønnevåg" <arve@android.com> Cc: Riley Andrews <riandrews@android.com> Cc: devel@driverdev.osuosl.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: fix coding style checks in sw_sync.cTrung Thanh Le2015-09-131-3/+3
| | | | | | | replace comparison "obj" to NULL with "!obj" Signed-off-by: Trung Thanh Le <trungthanh1608@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: sw_sync: checkpatch fixesPurnendu Kapadia2014-09-201-4/+3Star
| | | | | | | | | - no space after cast - allignment should match open parenthesis - remove unnecessary new line Signed-off-by: Purnendu Kapadia <pro8linux@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: android: sw_sync.c: Fixed coding style issue.Yee Chin, Chiam2014-08-161-0/+2
| | | | | | | Fixed coding style issue where blank line is missing after declaration. Signed-off-by: Yee Chin, Chiam <phathetique@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* android: convert sync to fence api, v6Maarten Lankhorst2014-07-081-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | Just to show it's easy. Android syncpoints can be mapped to a timeline. This removes the need to maintain a separate api for synchronization. I've left the android trace events in place, but the core fence events should already be sufficient for debugging. v2: - Call fence_remove_callback in sync_fence_free if not all fences have fired. v3: - Merge Colin Cross' bugfixes, and the android fence merge optimization. v4: - Merge with the upstream fixes. v5: - Fix small style issues pointed out by Thomas Hellstrom. v6: - Fix for updates to fence api. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: John Stultz <john.stultz@linaro.org> Acked-by: Sumit Semwal <sumit.semwal@linaro.org> Acked-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: android: fix missing a blank line after declarationsSeunghun Lee2014-05-041-0/+2
| | | | | | | This patch fixes "Missing a blank line after declarations" warnings. Signed-off-by: Seunghun Lee <waydi1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* android/sw_sync: use get_unused_fd_flags(O_CLOEXEC) instead of get_unused_fd()Yann Droneaud2013-08-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Macro get_unused_fd() is used to allocate a file descriptor with default flags. Those default flags (0) can be "unsafe": O_CLOEXEC must be used by default to not leak file descriptor across exec(). Instead of macro get_unused_fd(), functions anon_inode_getfd() or get_unused_fd_flags() should be used with flags given by userspace. If not possible, flags should be set to O_CLOEXEC to provide userspace with a default safe behavor. In a further patch, get_unused_fd() will be removed so that new code start using anon_inode_getfd() or get_unused_fd_flags() with correct flags. This patch replaces calls to get_unused_fd() with call to get_unused_fd_flags(O_CLOEXEC) following advice from Erik Gilling. Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> Cc: Erik Gilling <konkers@android.com> Cc: Colin Cross <ccross@google.com> Link: http://lkml.kernel.org/r/CACSP8SjZcpcpEtQHzcGYhf-MP7QGo0XpN7-uN7rmD=vNtopG=w@mail.gmail.com Link: http://lkml.kernel.org/r/cover.1376327678.git.ydroneaud@opteya.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: Fix lines over 80 chars in android sw_syncMarlies Ruck2013-05-201-2/+4
| | | | | | | | Fixes the following checkpatch warning: WARNING: Line over 80 characters Signed-off-by: Marlies Ruck <marlies.ruck@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: sync: Add compat_ioctl handlers to sync driversDmitry Pervushin2013-03-291-0/+1
| | | | | | | | | | | | | | | | | The sync drivers are missing compat_ioctl handlers, so this patch adds them. The same change has been submitted to AOSP: https://android-review.googlesource.com/#/c/54901/ Change-Id: If1a1ecc3952b321c8d64c6a8b050104859efc4b1 Cc: Erik Gilling <konkers@android.com> Cc: Dmitry Pervushin <dmitry.pervushin@linaro.org> Cc: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org> Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Dmitry Pervushin <dmitry.pervushin@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: sw_sync: sw_sync_timeline_ops can be staticChanglong Xie2013-03-111-8/+8
| | | | | | | Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Changlong Xie <changlongx.xie@intel.com> Acked-by: Erik Gilling <konkers@android.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: sw_sync: Convert to use new value_str debug opsErik Gilling2013-03-041-19/+17Star
| | | | | | | | | | | | | | | | | Switch from print_obj/print_pt to the new timeline_value_str and pt_value_str ops. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Add commit message] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: sw_sync: Fix error pathsRebecca Schultz Zavin2013-03-041-2/+7
| | | | | | | | | | | | | | | | | | | Check the return value of get_unused_fd to make sure a valid file descriptor is returned. Make sure to call put_unused_fd even if an error occurs before the fd can be used. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: sw_sync: Export sw_sync APIErik Gilling2013-03-041-1/+4
| | | | | | | | | | | | | | | Needed to let modules link against sw_sync. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: sw_sync: Add fill_driver_data supportErik Gilling2013-03-041-0/+14
| | | | | | | | | | | | | | | | Add fill_driver_data support to export fence data to ioctl Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Add commit message] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: sw_sync: Add debug supportErik Gilling2013-03-041-0/+19
| | | | | | | | | | | | | | | | Add debugfs support hooks. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Add commit message] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: sw_sync: Add cpu based sync driverErik Gilling2013-03-041-0/+224
Adds a base sync driver that uses the cpu for serialization. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Add commit message, whitespace fixes and move to staging directory] Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>