diff options
author | Arto Merilainen <amerilainen@nvidia.com> | 2014-03-19 03:38:25 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:08:53 -0400 |
commit | a9785995d5f22aaeb659285f8aeb64d8b56982e0 (patch) | |
tree | cc75f75bcf43db316a002a7a240b81f299bf6d7f /drivers/gpu/nvgpu/gk20a/kind_gk20a.h | |
parent | 61efaf843c22b85424036ec98015121c08f5f16c (diff) |
gpu: nvgpu: Add NVIDIA GPU Driver
This patch moves the NVIDIA GPU driver to a new location.
Bug 1482562
Change-Id: I24293810b9d0f1504fd9be00135e21dad656ccb6
Signed-off-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-on: http://git-master/r/383722
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/kind_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/kind_gk20a.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/kind_gk20a.h b/drivers/gpu/nvgpu/gk20a/kind_gk20a.h new file mode 100644 index 00000000..93f011d4 --- /dev/null +++ b/drivers/gpu/nvgpu/gk20a/kind_gk20a.h | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * drivers/video/tegra/host/gk20a/kind_gk20a.h | ||
3 | * | ||
4 | * GK20A memory kind management | ||
5 | * | ||
6 | * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms and conditions of the GNU General Public License, | ||
10 | * version 2, as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
13 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
14 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
15 | * more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License along with | ||
18 | * this program; if not, write to the Free Software Foundation, Inc., | ||
19 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
20 | */ | ||
21 | #ifndef __KIND_GK20A_H__ | ||
22 | #define __KIND_GK20A_H__ | ||
23 | |||
24 | |||
25 | void gk20a_init_uncompressed_kind_map(void); | ||
26 | void gk20a_init_kind_attr(void); | ||
27 | |||
28 | extern u16 gk20a_kind_attr[]; | ||
29 | #define NV_KIND_DEFAULT -1 | ||
30 | |||
31 | #define GK20A_KIND_ATTR_SUPPORTED BIT(0) | ||
32 | #define GK20A_KIND_ATTR_COMPRESSIBLE BIT(1) | ||
33 | #define GK20A_KIND_ATTR_Z BIT(2) | ||
34 | #define GK20A_KIND_ATTR_C BIT(3) | ||
35 | #define GK20A_KIND_ATTR_ZBC BIT(4) | ||
36 | |||
37 | static inline bool gk20a_kind_is_supported(u8 k) | ||
38 | { | ||
39 | return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_SUPPORTED); | ||
40 | } | ||
41 | static inline bool gk20a_kind_is_compressible(u8 k) | ||
42 | { | ||
43 | return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_COMPRESSIBLE); | ||
44 | } | ||
45 | |||
46 | static inline bool gk20a_kind_is_z(u8 k) | ||
47 | { | ||
48 | return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_Z); | ||
49 | } | ||
50 | |||
51 | static inline bool gk20a_kind_is_c(u8 k) | ||
52 | { | ||
53 | return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_C); | ||
54 | } | ||
55 | static inline bool gk20a_kind_is_zbc(u8 k) | ||
56 | { | ||
57 | return !!(gk20a_kind_attr[k] & GK20A_KIND_ATTR_ZBC); | ||
58 | } | ||
59 | |||
60 | /* maps kind to its uncompressed version */ | ||
61 | extern u8 gk20a_uc_kind_map[]; | ||
62 | static inline u8 gk20a_get_uncompressed_kind(u8 k) | ||
63 | { | ||
64 | return gk20a_uc_kind_map[k]; | ||
65 | } | ||
66 | |||
67 | #endif /* __KIND_GK20A_H__ */ | ||