mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
5a39271aa7
Change-Id: I7a12679eb3c10b1beaf36c6612cf2e3f6662a034 Signed-off-by: Greg Hackmann <ghackmann@google.com> Git-commit: 3eeae661f1c26431dd03d2760e2373620bb488ca Git-Repo: https://android.googlesource.com/kernel/common.git [imaund@codeaurora.org: Resolve merge conflicts] Signed-off-by: Ian Maund <imaund@codeaurora.org>
76 lines
1.7 KiB
C
76 lines
1.7 KiB
C
/*
|
|
* include/linux/sw_sync.h
|
|
*
|
|
* Copyright (C) 2012 Google, Inc.
|
|
*
|
|
* This software is licensed under the terms of the GNU General Public
|
|
* License version 2, as published by the Free Software Foundation, and
|
|
* may be copied, distributed, and modified under those terms.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
*/
|
|
|
|
#ifndef _LINUX_SW_SYNC_H
|
|
#define _LINUX_SW_SYNC_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
#ifdef __KERNEL__
|
|
|
|
#include <linux/kconfig.h>
|
|
#include <linux/sync.h>
|
|
|
|
struct sw_sync_timeline {
|
|
struct sync_timeline obj;
|
|
|
|
u32 value;
|
|
};
|
|
|
|
struct sw_sync_pt {
|
|
struct sync_pt pt;
|
|
|
|
u32 value;
|
|
};
|
|
|
|
#if IS_ENABLED(CONFIG_SW_SYNC)
|
|
struct sw_sync_timeline *sw_sync_timeline_create(const char *name);
|
|
void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc);
|
|
|
|
struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj, u32 value);
|
|
#else
|
|
static inline struct sw_sync_timeline *sw_sync_timeline_create(const char *name)
|
|
{
|
|
return NULL;
|
|
}
|
|
|
|
static inline void sw_sync_timeline_inc(struct sw_sync_timeline *obj, u32 inc)
|
|
{
|
|
}
|
|
|
|
static inline struct sync_pt *sw_sync_pt_create(struct sw_sync_timeline *obj,
|
|
u32 value)
|
|
{
|
|
return NULL;
|
|
}
|
|
#endif /* IS_ENABLED(CONFIG_SW_SYNC) */
|
|
|
|
#endif /* __KERNEL __ */
|
|
|
|
struct sw_sync_create_fence_data {
|
|
__u32 value;
|
|
char name[32];
|
|
__s32 fence; /* fd of new fence */
|
|
};
|
|
|
|
#define SW_SYNC_IOC_MAGIC 'W'
|
|
|
|
#define SW_SYNC_IOC_CREATE_FENCE _IOWR(SW_SYNC_IOC_MAGIC, 0,\
|
|
struct sw_sync_create_fence_data)
|
|
#define SW_SYNC_IOC_INC _IOW(SW_SYNC_IOC_MAGIC, 1, __u32)
|
|
|
|
|
|
#endif /* _LINUX_SW_SYNC_H */
|