164907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross/*
264907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross * Copyright (C) 2012 Google, Inc.
364907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross *
464907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross * This software is licensed under the terms of the GNU General Public
564907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross * License version 2, as published by the Free Software Foundation, and
664907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross * may be copied, distributed, and modified under those terms.
764907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross *
864907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross * This program is distributed in the hope that it will be useful,
964907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross * but WITHOUT ANY WARRANTY; without even the implied warranty of
1064907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1164907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross * GNU General Public License for more details.
1264907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross *
1364907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross */
1464907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross
1564907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross#ifndef _UAPI_LINUX_SW_SYNC_H
1664907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross#define _UAPI_LINUX_SW_SYNC_H
1764907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross
1864907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross#include <linux/types.h>
1964907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross
2064907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Crossstruct sw_sync_create_fence_data {
2164907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross	__u32	value;
2264907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross	char	name[32];
2364907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross	__s32	fence; /* fd of new fence */
2464907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross};
2564907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross
2664907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross#define SW_SYNC_IOC_MAGIC	'W'
2764907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross
2864907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross#define SW_SYNC_IOC_CREATE_FENCE	_IOWR(SW_SYNC_IOC_MAGIC, 0,\
2964907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross		struct sw_sync_create_fence_data)
3064907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross#define SW_SYNC_IOC_INC			_IOW(SW_SYNC_IOC_MAGIC, 1, __u32)
3164907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross
3264907b94dab947f3f3fc96fe1ab810cbc12ca902Colin Cross#endif /* _UAPI_LINUX_SW_SYNC_H */
33