diff options
author | Sami Kiminki <skiminki@nvidia.com> | 2017-11-02 16:03:15 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-11-10 11:38:19 -0500 |
commit | cefabe7eb1f1f1dba9692e21ab4f1b88b9163489 (patch) | |
tree | b0f4e6ce64cd408e780925b8b3365b45805b7d95 /drivers/gpu/nvgpu/gk20a/kind_gk20a.h | |
parent | b584bf8aa814d026498ebcee23480d1963338e47 (diff) |
gpu: nvgpu: Remove PTE kind logic
Since NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL was made mandatory,
kernel does not need to know the details about the PTE kinds
anymore. Thus, we can remove the kind_gk20a.h header and the code
related to kind table setup, as well as simplify buffer mapping code
a bit.
Bug 1902982
Change-Id: Iaf798023c219a64fb0a84da09431c5ce4bc046eb
Signed-off-by: Sami Kiminki <skiminki@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1560933
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/kind_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/kind_gk20a.h | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/kind_gk20a.h b/drivers/gpu/nvgpu/gk20a/kind_gk20a.h deleted file mode 100644 index da7c13cd..00000000 --- a/drivers/gpu/nvgpu/gk20a/kind_gk20a.h +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | /* | ||
2 | * drivers/video/tegra/host/gk20a/kind_gk20a.h | ||
3 | * | ||
4 | * GK20A memory kind management | ||
5 | * | ||
6 | * Copyright (c) 2011-2017, NVIDIA CORPORATION. All rights reserved. | ||
7 | * | ||
8 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
9 | * copy of this software and associated documentation files (the "Software"), | ||
10 | * to deal in the Software without restriction, including without limitation | ||
11 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
12 | * and/or sell copies of the Software, and to permit persons to whom the | ||
13 | * Software is furnished to do so, subject to the following conditions: | ||
14 | * | ||
15 | * The above copyright notice and this permission notice shall be included in | ||
16 | * all copies or substantial portions of the Software. | ||
17 | * | ||
18 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
19 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
20 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
21 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
22 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
23 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
24 | * DEALINGS IN THE SOFTWARE. | ||
25 | */ | ||
26 | #ifndef __KIND_GK20A_H__ | ||
27 | #define __KIND_GK20A_H__ | ||
28 | |||
29 | #include <nvgpu/bitops.h> | ||
30 | |||
31 | void gk20a_init_uncompressed_kind_map(void); | ||
32 | void gk20a_init_kind_attr(void); | ||
33 | |||
34 | extern u16 gk20a_kind_attr[]; | ||
35 | #define NV_KIND_ATTR_SIZE 256 | ||
36 | #define NV_KIND_DEFAULT -1 | ||
37 | |||
38 | #define GK20A_KIND_ATTR_SUPPORTED BIT(0) | ||
39 | #define GK20A_KIND_ATTR_COMPRESSIBLE BIT(1) | ||
40 | #define GK20A_KIND_ATTR_Z BIT(2) | ||
41 | #define GK20A_KIND_ATTR_C BIT(3) | ||
42 | #define GK20A_KIND_ATTR_ZBC BIT(4) | ||
43 | |||
44 | /* TBD: not sure on the work creation for gk20a, doubtful */ | ||
45 | static inline bool gk20a_kind_work_creation_sked(u8 k) | ||
46 | { | ||
47 | return false; | ||
48 | } | ||
49 | static inline bool gk20a_kind_work_creation_host(u8 k) | ||
50 | { | ||
51 | return false; | ||
52 | } | ||
53 | |||
54 | static inline bool gk20a_kind_work_creation(u8 k) | ||
55 | { | ||
56 | return gk20a_kind_work_creation_sked(k) || | ||
57 | gk20a_kind_work_creation_host(k); | ||
58 | } | ||
59 | |||
60 | static inline bool gk20a_kind_is_supported(u8 k) | ||
61 | { | ||
62 | return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_SUPPORTED); | ||
63 | } | ||
64 | static inline bool gk20a_kind_is_compressible(u8 k) | ||
65 | { | ||
66 | return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_COMPRESSIBLE); | ||
67 | } | ||
68 | |||
69 | static inline bool gk20a_kind_is_z(u8 k) | ||
70 | { | ||
71 | return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_Z); | ||
72 | } | ||
73 | |||
74 | static inline bool gk20a_kind_is_c(u8 k) | ||
75 | { | ||
76 | return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_C); | ||
77 | } | ||
78 | static inline bool gk20a_kind_is_zbc(u8 k) | ||
79 | { | ||
80 | return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_ZBC); | ||
81 | } | ||
82 | |||
83 | /* maps kind to its uncompressed version */ | ||
84 | extern u8 gk20a_uc_kind_map[]; | ||
85 | static inline u8 gk20a_get_uncompressed_kind(u8 k) | ||
86 | { | ||
87 | return gk20a_uc_kind_map[k]; | ||
88 | } | ||
89 | |||
90 | #endif /* __KIND_GK20A_H__ */ | ||