diff options
author | Seshendra Gadagottu <sgadagottu@nvidia.com> | 2016-04-14 16:01:58 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-04-16 10:48:28 -0400 |
commit | c84ddceda648d6e47828115654ca7745010ec09f (patch) | |
tree | 3dcd960110c55f694a16230323e77ac4d008970d /drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c | |
parent | 07cd80ab096346d64f93b051e80ba43c090deb09 (diff) |
gpu: nvgpu: gv11b: sm priv reg related changes
Included all basic ops for gv11b and updated
sm related functions to include new priv register
addresses.
Bug 1735757
Change-Id: Ie48651f918ee97fba00487111e4b28d6c95747f5
Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/1126961
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c b/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c new file mode 100644 index 00000000..3fb0fa23 --- /dev/null +++ b/drivers/gpu/nvgpu/gv11b/gr_ctx_gv11b.c | |||
@@ -0,0 +1,72 @@ | |||
1 | /* | ||
2 | * | ||
3 | * GV11B Graphics Context | ||
4 | * | ||
5 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms and conditions of the GNU General Public License, | ||
9 | * version 2, as published by the Free Software Foundation. | ||
10 | * | ||
11 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
14 | * more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License along with | ||
17 | * this program; if not, write to the Free Software Foundation, Inc., | ||
18 | * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
19 | */ | ||
20 | |||
21 | #include "gk20a/gk20a.h" | ||
22 | #include "gr_ctx_gv11b.h" | ||
23 | |||
24 | static int gr_gv11b_get_netlist_name(int index, char *name) | ||
25 | { | ||
26 | switch (index) { | ||
27 | #ifdef GV11B_NETLIST_IMAGE_FW_NAME | ||
28 | case NETLIST_FINAL: | ||
29 | sprintf(name, GV11B_NETLIST_IMAGE_FW_NAME); | ||
30 | return 0; | ||
31 | #endif | ||
32 | #ifdef GK20A_NETLIST_IMAGE_A | ||
33 | case NETLIST_SLOT_A: | ||
34 | sprintf(name, GK20A_NETLIST_IMAGE_A); | ||
35 | return 0; | ||
36 | #endif | ||
37 | #ifdef GK20A_NETLIST_IMAGE_B | ||
38 | case NETLIST_SLOT_B: | ||
39 | sprintf(name, GK20A_NETLIST_IMAGE_B); | ||
40 | return 0; | ||
41 | #endif | ||
42 | #ifdef GK20A_NETLIST_IMAGE_C | ||
43 | case NETLIST_SLOT_C: | ||
44 | sprintf(name, GK20A_NETLIST_IMAGE_C); | ||
45 | return 0; | ||
46 | #endif | ||
47 | #ifdef GK20A_NETLIST_IMAGE_D | ||
48 | case NETLIST_SLOT_D: | ||
49 | sprintf(name, GK20A_NETLIST_IMAGE_D); | ||
50 | return 0; | ||
51 | #endif | ||
52 | default: | ||
53 | return -1; | ||
54 | } | ||
55 | |||
56 | return -1; | ||
57 | } | ||
58 | |||
59 | static bool gr_gv11b_is_firmware_defined(void) | ||
60 | { | ||
61 | #ifdef GV11B_NETLIST_IMAGE_FW_NAME | ||
62 | return true; | ||
63 | #else | ||
64 | return false; | ||
65 | #endif | ||
66 | } | ||
67 | |||
68 | void gv11b_init_gr_ctx(struct gpu_ops *gops) { | ||
69 | gops->gr_ctx.get_netlist_name = gr_gv11b_get_netlist_name; | ||
70 | gops->gr_ctx.is_fw_defined = gr_gv11b_is_firmware_defined; | ||
71 | gops->gr_ctx.use_dma_for_fw_bootstrap = false; | ||
72 | } | ||