diff options
author | Zhou Peng <eagle.zhou@nxp.com> | 2018-05-14 20:03:24 +0800 |
---|---|---|
committer | Jason Liu <jason.hui.liu@nxp.com> | 2019-02-12 10:31:44 +0800 |
commit | b0ff8f1ef6a068176dcf07414517474e16558d2b (patch) | |
tree | 0658e216d907aae710c728cf73256d1d48e375e7 /include/uapi | |
parent | df4c38c44f83a2d75b5d05bf4df2181a6e83f597 (diff) |
MLK-18301-2 - [i.MX8MM/Hantro]: Enable hantro vpu on mscale 845S platform
Add hantro 845 h1 encoder driver source
Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
Diffstat (limited to 'include/uapi')
-rwxr-xr-x | include/uapi/linux/hx280enc.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/include/uapi/linux/hx280enc.h b/include/uapi/linux/hx280enc.h new file mode 100755 index 000000000000..1cc3471ce41d --- /dev/null +++ b/include/uapi/linux/hx280enc.h @@ -0,0 +1,74 @@ + /***************************************************************************** + * Encoder device driver (kernel module header) + * + * Copyright (C) 2012 Google Finland Oy. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * +-------------------------------------------------------------------------------- +-- +-- Abstract : 6280/7280/8270/8290/H1 Encoder device driver (kernel module) +-- +*****************************************************************************/ +#ifndef _UAPI_HX280ENC_H_ +#define _UAPI_HX280ENC_H_ +#include <linux/ioctl.h> /* needed for the _IOW etc stuff used later */ + +/* + * Macros to help debugging + */ + +#undef PDEBUG /* undef it, just in case */ +#ifdef HX280ENC_DEBUG +# ifdef __KERNEL__ + /* This one if debugging is on, and kernel space */ +# define PDEBUG(fmt, args...) printk(KERN_INFO "hmp4e: " fmt, ## args) +# else + /* This one for user space */ +# define PDEBUG(fmt, args...) printf(__FILE__ ":%d: " fmt, __LINE__, ## args) +# endif +#else +# define PDEBUG(fmt, args...) /* not debugging: nothing */ +#endif + +/* + * Ioctl definitions + */ + +/* Use 'k' as magic number */ +#define HX280ENC_IOC_MAGIC 'k' +/* + * S means "Set" through a ptr, + * T means "Tell" directly with the argument value + * G means "Get": reply by setting through a pointer + * Q means "Query": response is on the return value + * X means "eXchange": G and S atomically + * H means "sHift": T and Q atomically + */ + /* + * #define HX280ENC_IOCGBUFBUSADDRESS _IOR(HX280ENC_IOC_MAGIC, 1, unsigned long *) + * #define HX280ENC_IOCGBUFSIZE _IOR(HX280ENC_IOC_MAGIC, 2, unsigned int *) + */ +#define HX280ENC_IOCGHWOFFSET _IOR(HX280ENC_IOC_MAGIC, 3, unsigned long *) +#define HX280ENC_IOCGHWIOSIZE _IOR(HX280ENC_IOC_MAGIC, 4, unsigned int *) +#define HX280ENC_IOC_CLI _IO(HX280ENC_IOC_MAGIC, 5) +#define HX280ENC_IOC_STI _IO(HX280ENC_IOC_MAGIC, 6) +#define HX280ENC_IOCXVIRT2BUS _IOWR(HX280ENC_IOC_MAGIC, 7, unsigned long *) + +#define HX280ENC_IOCHARDRESET _IO(HX280ENC_IOC_MAGIC, 8) /* debugging tool */ + +#define HX280ENC_IOC_MAXNR 8 + +#endif /* !_UAPI_HX280ENC_H_ */ |