summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorArto Merilainen <amerilainen@nvidia.com>2016-05-24 10:12:12 -0400
committerArto Merilainen <amerilainen@nvidia.com>2016-06-14 14:32:47 -0400
commitc1019d0a308875e8f81430dc859ed857e0a0451a (patch)
tree0b2a9b6c7c7875a5fd861967bbed95244bdc2382 /include/uapi/linux
parent597f68348a5270155592f9ccdeb9c232a0e6eb72 (diff)
video: tegra: host: pva: Initial Ioctl
Added the ioctl header with structure defined in ISS file. Added the code support ioctl for reading the pva characteristics. JIRA PVA-48 Change-Id: Ie19972c6e8586da27ecc89d285a169567e5bd8fe Signed-off-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-on: http://git-master/r/1152518 Reviewed-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> Tested-by: Vinod Gopalakrishnakurup <vinodg@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/nvhost_pva_ioctl.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/include/uapi/linux/nvhost_pva_ioctl.h b/include/uapi/linux/nvhost_pva_ioctl.h
new file mode 100644
index 000000000..b431445a4
--- /dev/null
+++ b/include/uapi/linux/nvhost_pva_ioctl.h
@@ -0,0 +1,75 @@
1/*
2 * Tegra PVA Driver ioctls
3 *
4 * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along with
16 * this program; If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef __LINUX_NVHOST_PVA_IOCTL_H
20#define __LINUX_NVHOST_PVA_IOCTL_H
21
22#include <linux/ioctl.h>
23#include <linux/types.h>
24
25#if !defined(__KERNEL__)
26#define __user
27#endif
28
29#define NVHOST_PVA_IOCTL_MAGIC 'P'
30
31/**
32 * struct pva_characteristics_req - Request filling of characteristics struct
33 *
34 * @characteristics: pointer to be filled with characteristics
35 * @characteristics_size: size in bytes
36 * @characteristics_filled: reserved(set to zero)
37 *
38 */
39struct pva_characteristics_req {
40 __u64 characteristics;
41 __u64 characteristics_size;
42 __u64 characteristics_filled;
43};
44
45/**
46 * struct pva_characteristics - the information of the pva cluster
47 *
48 * @num_vpu: number of vpu per pva
49 * @vpu_generation: vpu hardware generation
50 * @task_structure_version: highest supported task struct ver
51 * @reserved: reserved for future use
52 * @r5_ucode_version: R5 firmware version
53 * @r5_ucode_earliest: 1st version compatible with current running fw
54 * @r5_vpu_runtime_earliest: First supported vpu runtime version
55 *
56 */
57struct pva_characteristics {
58 __u8 num_vpu;
59 __u8 vpu_generation;
60 __u8 reserved[6];
61 __u32 r5_ucode_version;
62 __u32 r5_ucode_earliest;
63 __u32 r5_vpu_runtime_earliest;
64};
65
66
67#define PVA_IOCTL_CHARACTERISTICS \
68 _IOWR(NVHOST_PVA_IOCTL_MAGIC, 1, struct pva_characteristics_req)
69
70
71#define NVHOST_PVA_IOCTL_LAST _IOC_NR(PVA_IOCTL_CHARACTERISTICS)
72#define NVHOST_PVA_IOCTL_MAX_ARG_SIZE sizeof(struct pva_characteristics_req)
73
74#endif /* __LINUX_NVHOST_PVA_IOCTL_H */
75