diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/nvhost.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvhost.h b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h new file mode 100644 index 00000000..025061dc --- /dev/null +++ b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h | |||
@@ -0,0 +1,75 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #ifndef __NVGPU_NVHOST_H__ | ||
18 | #define __NVGPU_NVHOST_H__ | ||
19 | |||
20 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | ||
21 | |||
22 | struct nvgpu_nvhost_dev; | ||
23 | struct gk20a; | ||
24 | struct sync_pt; | ||
25 | struct sync_fence; | ||
26 | struct timespec; | ||
27 | |||
28 | int nvgpu_get_nvhost_dev(struct gk20a *g); | ||
29 | void nvgpu_free_nvhost_dev(struct gk20a *g); | ||
30 | |||
31 | int nvgpu_nvhost_module_busy_ext(struct nvgpu_nvhost_dev *nvhost_dev); | ||
32 | void nvgpu_nvhost_module_idle_ext(struct nvgpu_nvhost_dev *nvhost_dev); | ||
33 | |||
34 | void nvgpu_nvhost_debug_dump_device(struct nvgpu_nvhost_dev *nvhost_dev); | ||
35 | |||
36 | int nvgpu_nvhost_syncpt_is_expired_ext(struct nvgpu_nvhost_dev *nvhost_dev, | ||
37 | u32 id, u32 thresh); | ||
38 | int nvgpu_nvhost_syncpt_wait_timeout_ext(struct nvgpu_nvhost_dev *nvhost_dev, | ||
39 | u32 id, u32 thresh, u32 timeout, u32 *value, struct timespec *ts); | ||
40 | |||
41 | u32 nvgpu_nvhost_syncpt_incr_max_ext(struct nvgpu_nvhost_dev *nvhost_dev, | ||
42 | u32 id, u32 incrs); | ||
43 | void nvgpu_nvhost_syncpt_set_min_eq_max_ext(struct nvgpu_nvhost_dev *nvhost_dev, | ||
44 | u32 id); | ||
45 | int nvgpu_nvhost_syncpt_read_ext_check(struct nvgpu_nvhost_dev *nvhost_dev, | ||
46 | u32 id, u32 *val); | ||
47 | |||
48 | int nvgpu_nvhost_intr_register_notifier(struct nvgpu_nvhost_dev *nvhost_dev, | ||
49 | u32 id, u32 thresh, void (*callback)(void *, int), void *private_data); | ||
50 | |||
51 | const char *nvgpu_nvhost_syncpt_get_name(struct nvgpu_nvhost_dev *nvhost_dev, | ||
52 | int id); | ||
53 | bool nvgpu_nvhost_syncpt_is_valid_pt_ext(struct nvgpu_nvhost_dev *nvhost_dev, | ||
54 | u32 id); | ||
55 | void nvgpu_nvhost_syncpt_put_ref_ext(struct nvgpu_nvhost_dev *nvhost_dev, | ||
56 | u32 id); | ||
57 | u32 nvgpu_nvhost_get_syncpt_host_managed(struct nvgpu_nvhost_dev *nvhost_dev, | ||
58 | u32 param, | ||
59 | const char *syncpt_name); | ||
60 | |||
61 | int nvgpu_nvhost_create_symlink(struct gk20a *g); | ||
62 | void nvgpu_nvhost_remove_symlink(struct gk20a *g); | ||
63 | |||
64 | #ifdef CONFIG_SYNC | ||
65 | u32 nvgpu_nvhost_sync_pt_id(struct sync_pt *pt); | ||
66 | u32 nvgpu_nvhost_sync_pt_thresh(struct sync_pt *pt); | ||
67 | int nvgpu_nvhost_sync_num_pts(struct sync_fence *fence); | ||
68 | |||
69 | struct sync_fence *nvgpu_nvhost_sync_fdget(int fd); | ||
70 | struct sync_fence *nvgpu_nvhost_sync_create_fence( | ||
71 | struct nvgpu_nvhost_dev *nvhost_dev, | ||
72 | u32 id, u32 thresh, u32 num_pts, const char *name); | ||
73 | #endif /* CONFIG_SYNC */ | ||
74 | #endif /* CONFIG_TEGRA_GK20A_NVHOST */ | ||
75 | #endif /* __NVGPU_NVHOST_H__ */ | ||