diff options
author | Gajanan Bhat <gbhat@nvidia.com> | 2011-06-23 19:09:21 -0700 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-07-21 15:11:52 -0700 |
commit | 4f6dcc0453cddac9e08bfc2a9ee468e62edf6774 (patch) | |
tree | 6147d22df172c48d19cc8ffcc502ab387a906236 /include | |
parent | 89f82d3c1d06f1952b281516edad965f16297121 (diff) |
media: tegra: avp: Add channel based AVP driver
New AVP driver based on channel model. The AVP
acts as s/w host1x channel and has a syncpoint
allocated to synchronize audio/video operation
submitted by the host. The driver is responsible
for loading the AVP kernel and initializing s/w
channel.
Change-Id: I20b68fc3cbb88b7c95542bae0a1acf5edc52c715
Reviewed-on: http://git-master/r/37420
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/tegra_nvavp.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/include/linux/tegra_nvavp.h b/include/linux/tegra_nvavp.h new file mode 100644 index 000000000000..475a7beb44d4 --- /dev/null +++ b/include/linux/tegra_nvavp.h @@ -0,0 +1,58 @@ +/* + * include/linux/tegra_nvavp.h + * + * Copyright (C) 2011 NVIDIA Corp. + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +#ifndef __LINUX_TEGRA_NVAVP_H +#define __LINUX_TEGRA_NVAVP_H + +#include <linux/ioctl.h> +#include <linux/types.h> + +#define NVAVP_MAX_RELOCATION_COUNT 64 + +struct nvavp_cmdbuf { + __u32 mem; + __u32 offset; + __u32 words; +}; + +struct nvavp_reloc { + __u32 cmdbuf_mem; + __u32 cmdbuf_offset; + __u32 target; + __u32 target_offset; +}; + +struct nvavp_syncpt { + __u32 id; + __u32 value; +}; + +struct nvavp_pushbuffer_submit_hdr { + struct nvavp_cmdbuf cmdbuf; + struct nvavp_reloc *relocs; + __u32 num_relocs; + struct nvavp_syncpt *syncpt; +}; + +struct nvavp_set_nvmap_fd_args { + __u32 fd; +}; + +#define NVAVP_IOCTL_MAGIC 'n' + +#define NVAVP_IOCTL_SET_NVMAP_FD _IOW(NVAVP_IOCTL_MAGIC, 0x60, \ + struct nvavp_set_nvmap_fd_args) +#define NVAVP_IOCTL_PUSH_BUFFER_SUBMIT _IOWR(NVAVP_IOCTL_MAGIC, 0x63, \ + struct nvavp_pushbuffer_submit_hdr) + +#define NVAVP_IOCTL_MIN_NR _IOC_NR(NVAVP_IOCTL_SET_NVMAP_FD) +#define NVAVP_IOCTL_MAX_NR _IOC_NR(NVAVP_IOCTL_PUSH_BUFFER_SUBMIT) + +#endif /* __LINUX_TEGRA_NVAVP_H */ |