summaryrefslogtreecommitdiffstats
path: root/libsync
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.com>2016-06-10 16:51:29 -0300
committerDmitry Shmidt <dimitrysh@google.com>2017-01-17 14:28:45 -0800
commitffc687baad033ecc96f6c560b205fea61afe9e41 (patch)
tree2f361fc5832adc9145a21dbab1bb5f88d4f8edfd /libsync
parent6786575d42e78c8faa51393871eb958d87d57e08 (diff)
downloadsystem_core-ffc687baad033ecc96f6c560b205fea61afe9e41.tar.gz
system_core-ffc687baad033ecc96f6c560b205fea61afe9e41.tar.bz2
system_core-ffc687baad033ecc96f6c560b205fea61afe9e41.zip
libsync: open new location of sw_sync file
sw_sync file for debug was moved to debugfs. Try to open it and if it fails try to open /dev/sw_sync. Test: Sync unit tests still passes. Change-Id: Ie078fbc2eb5294f28b916a9e65b7fcd3a18a8580 hange-Id: I216874964368d939bed2779d98cd89e527a57d45
Diffstat (limited to 'libsync')
-rw-r--r--libsync/sync.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libsync/sync.c b/libsync/sync.c
index fff62e77c..5946096b0 100644
--- a/libsync/sync.c
+++ b/libsync/sync.c
@@ -101,7 +101,13 @@ void sync_fence_info_free(struct sync_fence_info_data *info)
int sw_sync_timeline_create(void)
{
- return open("/dev/sw_sync", O_RDWR);
+ int ret;
+
+ ret = open("/sys/kernel/debug/sync/sw_sync", O_RDWR);
+ if (ret < 0)
+ ret = open("/dev/sw_sync", O_RDWR);
+
+ return ret;
}
int sw_sync_timeline_inc(int fd, unsigned count)