diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2018-01-17 15:39:13 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-01-23 01:20:15 -0500 |
commit | f3f14cdff53f4b936e2505d44aad6e3bca143056 (patch) | |
tree | 8d6438132b8ca429758d18142c5f569f60f2bc35 /drivers/gpu/nvgpu/include | |
parent | 193a2ed38ca51d898ac811820ab86237c84e18eb (diff) |
gpu: nvgpu: Fold T19x code back to main code paths
Lots of code paths were split to T19x specific code paths and structs
due to split repository. Now that repositories are merged, fold all of
them back to main code paths and structs and remove the T19x specific
Kconfig flag.
Change-Id: Id0d17a5f0610fc0b49f51ab6664e716dc8b222b6
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1640606
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/enabled.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/enabled_t19x.h | 29 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/gmmu.h | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/gmmu_t19x.h | 34 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/io.h | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/io_usermode.h (renamed from drivers/gpu/nvgpu/include/nvgpu/io_t19x.h) | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/linux/io_t19x.h | 26 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/linux/module_t19x.h | 27 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/linux/os_linux_t19x.h | 26 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/linux/pci_t19x.h | 23 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/mm.h | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/nvhost.h | 16 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/nvhost_t19x.h | 37 |
13 files changed, 28 insertions, 224 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h index 001cafb0..c614ce4d 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h +++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -142,6 +142,8 @@ struct gk20a; | |||
142 | 142 | ||
143 | /* set if ASPM is enabled; only makes sense for PCI */ | 143 | /* set if ASPM is enabled; only makes sense for PCI */ |
144 | #define NVGPU_SUPPORT_ASPM 62 | 144 | #define NVGPU_SUPPORT_ASPM 62 |
145 | /* subcontexts are available */ | ||
146 | #define NVGPU_SUPPORT_TSG_SUBCONTEXTS 63 | ||
145 | /* | 147 | /* |
146 | * Must be greater than the largest bit offset in the above list. | 148 | * Must be greater than the largest bit offset in the above list. |
147 | */ | 149 | */ |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled_t19x.h b/drivers/gpu/nvgpu/include/nvgpu/enabled_t19x.h deleted file mode 100644 index 9ef1dc30..00000000 --- a/drivers/gpu/nvgpu/include/nvgpu/enabled_t19x.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | * DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #ifndef __NVGPU_ENABLED_T19X_H__ | ||
24 | #define __NVGPU_ENABLED_T19X_H__ | ||
25 | |||
26 | /* subcontexts are available */ | ||
27 | #define NVGPU_SUPPORT_TSG_SUBCONTEXTS 63 | ||
28 | |||
29 | #endif | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/gmmu.h b/drivers/gpu/nvgpu/include/nvgpu/gmmu.h index ade94df9..02b211d6 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/gmmu.h +++ b/drivers/gpu/nvgpu/include/nvgpu/gmmu.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -29,10 +29,6 @@ | |||
29 | #include <nvgpu/rbtree.h> | 29 | #include <nvgpu/rbtree.h> |
30 | #include <nvgpu/lock.h> | 30 | #include <nvgpu/lock.h> |
31 | 31 | ||
32 | #ifdef CONFIG_TEGRA_19x_GPU | ||
33 | #include <nvgpu/gmmu_t19x.h> | ||
34 | #endif | ||
35 | |||
36 | /* | 32 | /* |
37 | * This is the GMMU API visible to blocks outside of the GMMU. Basically this | 33 | * This is the GMMU API visible to blocks outside of the GMMU. Basically this |
38 | * API supports all the different types of mappings that might be done in the | 34 | * API supports all the different types of mappings that might be done in the |
@@ -180,9 +176,7 @@ struct nvgpu_gmmu_attrs { | |||
180 | enum nvgpu_aperture aperture; | 176 | enum nvgpu_aperture aperture; |
181 | bool debug; | 177 | bool debug; |
182 | 178 | ||
183 | #ifdef CONFIG_TEGRA_19x_GPU | 179 | bool l3_alloc; |
184 | struct nvgpu_gmmu_attrs_t19x t19x_attrs; | ||
185 | #endif | ||
186 | }; | 180 | }; |
187 | 181 | ||
188 | struct gk20a_mmu_level { | 182 | struct gk20a_mmu_level { |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/gmmu_t19x.h b/drivers/gpu/nvgpu/include/nvgpu/gmmu_t19x.h deleted file mode 100644 index eea51fbb..00000000 --- a/drivers/gpu/nvgpu/include/nvgpu/gmmu_t19x.h +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | * DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #ifndef __NVGPU_GMMU_T19X_H__ | ||
24 | #define __NVGPU_GMMU_T19X_H__ | ||
25 | |||
26 | struct nvgpu_gmmu_attrs; | ||
27 | |||
28 | struct nvgpu_gmmu_attrs_t19x { | ||
29 | bool l3_alloc; | ||
30 | }; | ||
31 | |||
32 | void nvgpu_gmmu_add_t19x_attrs(struct nvgpu_gmmu_attrs *attrs, u32 flags); | ||
33 | |||
34 | #endif | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/io.h b/drivers/gpu/nvgpu/include/nvgpu/io.h index b7281b41..28011e04 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/io.h +++ b/drivers/gpu/nvgpu/include/nvgpu/io.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -23,9 +23,6 @@ | |||
23 | #define __NVGPU_IO_H__ | 23 | #define __NVGPU_IO_H__ |
24 | 24 | ||
25 | #include <nvgpu/types.h> | 25 | #include <nvgpu/types.h> |
26 | #ifdef CONFIG_TEGRA_19x_GPU | ||
27 | #include <nvgpu/io_t19x.h> | ||
28 | #endif | ||
29 | 26 | ||
30 | /* Legacy defines - should be removed once everybody uses nvgpu_* */ | 27 | /* Legacy defines - should be removed once everybody uses nvgpu_* */ |
31 | #define gk20a_writel nvgpu_writel | 28 | #define gk20a_writel nvgpu_writel |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/io_t19x.h b/drivers/gpu/nvgpu/include/nvgpu/io_usermode.h index f8c7dbbd..a756ef44 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/io_t19x.h +++ b/drivers/gpu/nvgpu/include/nvgpu/io_usermode.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -19,11 +19,9 @@ | |||
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | * DEALINGS IN THE SOFTWARE. | 20 | * DEALINGS IN THE SOFTWARE. |
21 | */ | 21 | */ |
22 | #ifndef __NVGPU_IO_T19X_H__ | 22 | #ifndef __NVGPU_IO_USERMODE_H__ |
23 | #define __NVGPU_IO_T19X_H__ | 23 | #define __NVGPU_IO_USERMODE_H__ |
24 | 24 | ||
25 | #ifdef __KERNEL__ | 25 | void nvgpu_usermode_writel(struct gk20a *g, u32 r, u32 v); |
26 | #include "linux/io_t19x.h" | ||
27 | #endif | ||
28 | 26 | ||
29 | #endif | 27 | #endif |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/io_t19x.h b/drivers/gpu/nvgpu/include/nvgpu/linux/io_t19x.h deleted file mode 100644 index f71a6ecf..00000000 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/io_t19x.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
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_IO_T19X_LINUX_H__ | ||
18 | #define __NVGPU_IO_T19X_LINUX_H__ | ||
19 | |||
20 | #include <nvgpu/types.h> | ||
21 | |||
22 | struct gk20a; | ||
23 | |||
24 | void gv11b_usermode_writel(struct gk20a *g, u32 r, u32 v); | ||
25 | |||
26 | #endif | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/module_t19x.h b/drivers/gpu/nvgpu/include/nvgpu/linux/module_t19x.h deleted file mode 100644 index a105c6dc..00000000 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/module_t19x.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
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_MODULE_T19X_H__ | ||
18 | #define __NVGPU_MODULE_T19X_H__ | ||
19 | |||
20 | struct gk20a; | ||
21 | |||
22 | void t19x_init_support(struct gk20a *g); | ||
23 | void t19x_remove_support(struct gk20a *g); | ||
24 | void t19x_lockout_registers(struct gk20a *g); | ||
25 | void t19x_restore_registers(struct gk20a *g); | ||
26 | |||
27 | #endif | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/os_linux_t19x.h b/drivers/gpu/nvgpu/include/nvgpu/linux/os_linux_t19x.h deleted file mode 100644 index a306bfb8..00000000 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/os_linux_t19x.h +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
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 | #ifndef NVGPU_OS_LINUX_T19X_H | ||
17 | #define NVGPU_OS_LINUX_T19X_H | ||
18 | |||
19 | #include <linux/compiler.h> | ||
20 | |||
21 | struct nvgpu_os_linux_t19x { | ||
22 | void __iomem *usermode_regs; | ||
23 | void __iomem *usermode_regs_saved; | ||
24 | }; | ||
25 | |||
26 | #endif | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/pci_t19x.h b/drivers/gpu/nvgpu/include/nvgpu/linux/pci_t19x.h deleted file mode 100644 index c94176cc..00000000 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/pci_t19x.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
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 | #ifndef __NVGPU_PCI_T19X_H__ | ||
17 | #define __NVGPU_PCI_T19X_H__ | ||
18 | |||
19 | struct nvgpu_os_linux; | ||
20 | |||
21 | void t19x_nvgpu_pci_init_support(struct nvgpu_os_linux *l); | ||
22 | |||
23 | #endif | ||
diff --git a/drivers/gpu/nvgpu/include/nvgpu/mm.h b/drivers/gpu/nvgpu/include/nvgpu/mm.h index f2d3ba26..e7b3e52c 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/mm.h +++ b/drivers/gpu/nvgpu/include/nvgpu/mm.h | |||
@@ -1,4 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
2 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
3 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
4 | * to deal in the Software without restriction, including without limitation | 6 | * to deal in the Software without restriction, including without limitation |
@@ -126,13 +128,12 @@ struct mm_gk20a { | |||
126 | 128 | ||
127 | struct nvgpu_mem bar2_desc; | 129 | struct nvgpu_mem bar2_desc; |
128 | 130 | ||
129 | #ifdef CONFIG_TEGRA_19x_GPU | ||
130 | struct nvgpu_mem hw_fault_buf[FAULT_TYPE_NUM]; | 131 | struct nvgpu_mem hw_fault_buf[FAULT_TYPE_NUM]; |
131 | unsigned int hw_fault_buf_status[FAULT_TYPE_NUM]; | 132 | unsigned int hw_fault_buf_status[FAULT_TYPE_NUM]; |
132 | struct mmu_fault_info *fault_info[FAULT_TYPE_NUM]; | 133 | struct mmu_fault_info *fault_info[FAULT_TYPE_NUM]; |
133 | struct nvgpu_mutex hub_isr_mutex; | 134 | struct nvgpu_mutex hub_isr_mutex; |
134 | u32 hub_intr_types; | 135 | u32 hub_intr_types; |
135 | #endif | 136 | |
136 | /* | 137 | /* |
137 | * Separate function to cleanup the CE since it requires a channel to | 138 | * Separate function to cleanup the CE since it requires a channel to |
138 | * be closed which must happen before fifo cleanup. | 139 | * be closed which must happen before fifo cleanup. |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvhost.h b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h index d852c77c..6e92637a 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvhost.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvhost.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * Permission is hereby granted, free of charge, to any person obtaining a | 4 | * Permission is hereby granted, free of charge, to any person obtaining a |
5 | * copy of this software and associated documentation files (the "Software"), | 5 | * copy of this software and associated documentation files (the "Software"), |
@@ -77,5 +77,19 @@ struct sync_fence *nvgpu_nvhost_sync_create_fence( | |||
77 | struct nvgpu_nvhost_dev *nvhost_dev, | 77 | struct nvgpu_nvhost_dev *nvhost_dev, |
78 | u32 id, u32 thresh, const char *name); | 78 | u32 id, u32 thresh, const char *name); |
79 | #endif /* CONFIG_SYNC */ | 79 | #endif /* CONFIG_SYNC */ |
80 | |||
81 | #ifdef CONFIG_TEGRA_T19X_GRHOST | ||
82 | int nvgpu_nvhost_syncpt_unit_interface_get_aperture( | ||
83 | struct nvgpu_nvhost_dev *nvhost_dev, | ||
84 | u64 *base, size_t *size); | ||
85 | u32 nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(u32 syncpt_id); | ||
86 | #else | ||
87 | static inline int nvgpu_nvhost_syncpt_unit_interface_get_aperture( | ||
88 | struct nvgpu_nvhost_dev *nvhost_dev, | ||
89 | u64 *base, size_t *size) { return -EINVAL; } | ||
90 | static inline u32 nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(u32 syncpt_id) { | ||
91 | return 0; | ||
92 | } | ||
93 | #endif | ||
80 | #endif /* CONFIG_TEGRA_GK20A_NVHOST */ | 94 | #endif /* CONFIG_TEGRA_GK20A_NVHOST */ |
81 | #endif /* __NVGPU_NVHOST_H__ */ | 95 | #endif /* __NVGPU_NVHOST_H__ */ |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvhost_t19x.h b/drivers/gpu/nvgpu/include/nvgpu/nvhost_t19x.h deleted file mode 100644 index 4b499882..00000000 --- a/drivers/gpu/nvgpu/include/nvgpu/nvhost_t19x.h +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
5 | * copy of this software and associated documentation files (the "Software"), | ||
6 | * to deal in the Software without restriction, including without limitation | ||
7 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
8 | * and/or sell copies of the Software, and to permit persons to whom the | ||
9 | * Software is furnished to do so, subject to the following conditions: | ||
10 | * | ||
11 | * The above copyright notice and this permission notice shall be included in | ||
12 | * all copies or substantial portions of the Software. | ||
13 | * | ||
14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
17 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
19 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
20 | * DEALINGS IN THE SOFTWARE. | ||
21 | */ | ||
22 | |||
23 | #ifndef __NVGPU_NVHOST_T19X_H__ | ||
24 | #define __NVGPU_NVHOST_T19X_H__ | ||
25 | |||
26 | #ifdef CONFIG_TEGRA_GK20A_NVHOST | ||
27 | #include <nvgpu/types.h> | ||
28 | |||
29 | struct nvgpu_nvhost_dev; | ||
30 | |||
31 | int nvgpu_nvhost_syncpt_unit_interface_get_aperture( | ||
32 | struct nvgpu_nvhost_dev *nvhost_dev, | ||
33 | u64 *base, size_t *size); | ||
34 | u32 nvgpu_nvhost_syncpt_unit_interface_get_byte_offset(u32 syncpt_id); | ||
35 | |||
36 | #endif | ||
37 | #endif /* __NVGPU_NVHOST_T19X_H__ */ | ||