Change-Id: If1fc2c7da2d80dfe86cd8229ee8a8e03269809d7
#define FENCE_IOC_WAIT _IOW(FENCE_IOC_MAGIC, 0, __s32)
#define FENCE_IOC_MERGE _IOWR(FENCE_IOC_MAGIC, 1, struct sync_merge_data)
#define FENCE_IOC_WAIT _IOW(FENCE_IOC_MAGIC, 0, __s32)
#define FENCE_IOC_MERGE _IOWR(FENCE_IOC_MAGIC, 1, struct sync_merge_data)
+/* Path to the sync device legacy file. */
+#define SYNC_DEVICE_PATH_LEGACY "/dev/sw_sync"
+
/* Path to the sync device file. */
/* Path to the sync device file. */
-#define SYNC_DEVICE_PATH "/dev/sw_sync"
+#define SYNC_DEVICE_PATH "/sys/kernel/debug/sync/sw_sync"
/* Argument data structure for the timeline.create_fence ioctl. */
struct create_fence_data {
/* Argument data structure for the timeline.create_fence ioctl. */
struct create_fence_data {
{
tbm_fd timeline = open(SYNC_DEVICE_PATH, O_RDWR | O_CLOEXEC);
{
tbm_fd timeline = open(SYNC_DEVICE_PATH, O_RDWR | O_CLOEXEC);
+ if (timeline < 0)
+ timeline = open(SYNC_DEVICE_PATH_LEGACY, O_RDWR | O_CLOEXEC);
+
if (timeline == -1)
_log_errno();
if (timeline == -1)
_log_errno();