diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp106')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 22 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/ltc_gp106.c | 27 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/ltc_gp106.h | 19 |
3 files changed, 19 insertions, 49 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index d923e5e9..adea3eb8 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include "gk20a/pramin_gk20a.h" | 20 | #include "gk20a/pramin_gk20a.h" |
21 | #include "gk20a/flcn_gk20a.h" | 21 | #include "gk20a/flcn_gk20a.h" |
22 | 22 | ||
23 | #include "gp10b/ltc_gp10b.h" | ||
23 | #include "gp10b/gr_gp10b.h" | 24 | #include "gp10b/gr_gp10b.h" |
24 | #include "gp10b/fecs_trace_gp10b.h" | 25 | #include "gp10b/fecs_trace_gp10b.h" |
25 | #include "gp10b/mc_gp10b.h" | 26 | #include "gp10b/mc_gp10b.h" |
@@ -32,6 +33,7 @@ | |||
32 | #include "gp106/fifo_gp106.h" | 33 | #include "gp106/fifo_gp106.h" |
33 | #include "gp106/regops_gp106.h" | 34 | #include "gp106/regops_gp106.h" |
34 | 35 | ||
36 | #include "gm20b/ltc_gm20b.h" | ||
35 | #include "gm20b/gr_gm20b.h" | 37 | #include "gm20b/gr_gm20b.h" |
36 | #include "gm20b/fifo_gm20b.h" | 38 | #include "gm20b/fifo_gm20b.h" |
37 | #include "gm20b/pmu_gm20b.h" | 39 | #include "gm20b/pmu_gm20b.h" |
@@ -42,7 +44,6 @@ | |||
42 | #include "gp106/therm_gp106.h" | 44 | #include "gp106/therm_gp106.h" |
43 | #include "gp106/xve_gp106.h" | 45 | #include "gp106/xve_gp106.h" |
44 | #include "gp106/fifo_gp106.h" | 46 | #include "gp106/fifo_gp106.h" |
45 | #include "gp106/ltc_gp106.h" | ||
46 | #include "gp106/clk_gp106.h" | 47 | #include "gp106/clk_gp106.h" |
47 | #include "gp106/mm_gp106.h" | 48 | #include "gp106/mm_gp106.h" |
48 | #include "gp106/pmu_gp106.h" | 49 | #include "gp106/pmu_gp106.h" |
@@ -58,7 +59,22 @@ | |||
58 | 59 | ||
59 | #include <nvgpu/hw/gp106/hw_proj_gp106.h> | 60 | #include <nvgpu/hw/gp106/hw_proj_gp106.h> |
60 | 61 | ||
61 | static struct gpu_ops gp106_ops = { | 62 | static const struct gpu_ops gp106_ops = { |
63 | .ltc = { | ||
64 | .determine_L2_size_bytes = gp10b_determine_L2_size_bytes, | ||
65 | .set_zbc_color_entry = gm20b_ltc_set_zbc_color_entry, | ||
66 | .set_zbc_depth_entry = gm20b_ltc_set_zbc_depth_entry, | ||
67 | .init_cbc = NULL, | ||
68 | .init_fs_state = gm20b_ltc_init_fs_state, | ||
69 | .init_comptags = gp10b_ltc_init_comptags, | ||
70 | .cbc_ctrl = gm20b_ltc_cbc_ctrl, | ||
71 | .isr = gp10b_ltc_isr, | ||
72 | .cbc_fix_config = NULL, | ||
73 | .flush = gm20b_flush_ltc, | ||
74 | #ifdef CONFIG_DEBUG_FS | ||
75 | .sync_debugfs = gp10b_ltc_sync_debugfs, | ||
76 | #endif | ||
77 | }, | ||
62 | .clock_gating = { | 78 | .clock_gating = { |
63 | .slcg_bus_load_gating_prod = | 79 | .slcg_bus_load_gating_prod = |
64 | gp106_slcg_bus_load_gating_prod, | 80 | gp106_slcg_bus_load_gating_prod, |
@@ -229,6 +245,7 @@ int gp106_init_hal(struct gk20a *g) | |||
229 | 245 | ||
230 | gk20a_dbg_fn(""); | 246 | gk20a_dbg_fn(""); |
231 | 247 | ||
248 | gops->ltc = gp106_ops.ltc; | ||
232 | gops->clock_gating = gp106_ops.clock_gating; | 249 | gops->clock_gating = gp106_ops.clock_gating; |
233 | 250 | ||
234 | gops->privsecurity = 1; | 251 | gops->privsecurity = 1; |
@@ -239,7 +256,6 @@ int gp106_init_hal(struct gk20a *g) | |||
239 | gp10b_init_priv_ring(gops); | 256 | gp10b_init_priv_ring(gops); |
240 | gp106_init_gr(gops); | 257 | gp106_init_gr(gops); |
241 | gp10b_init_fecs_trace_ops(gops); | 258 | gp10b_init_fecs_trace_ops(gops); |
242 | gp106_init_ltc(gops); | ||
243 | gp106_init_fb(gops); | 259 | gp106_init_fb(gops); |
244 | gp106_init_fifo(gops); | 260 | gp106_init_fifo(gops); |
245 | gp10b_init_ce(gops); | 261 | gp10b_init_ce(gops); |
diff --git a/drivers/gpu/nvgpu/gp106/ltc_gp106.c b/drivers/gpu/nvgpu/gp106/ltc_gp106.c deleted file mode 100644 index 755e4b05..00000000 --- a/drivers/gpu/nvgpu/gp106/ltc_gp106.c +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016, 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 | |||
14 | #include "gk20a/gk20a.h" | ||
15 | #include "gm20b/ltc_gm20b.h" | ||
16 | #include "gp10b/ltc_gp10b.h" | ||
17 | #include "gp106/ltc_gp106.h" | ||
18 | |||
19 | void gp106_init_ltc(struct gpu_ops *gops) | ||
20 | { | ||
21 | gp10b_init_ltc(gops); | ||
22 | |||
23 | /* dGPU does not need the LTC hack */ | ||
24 | gops->ltc.cbc_fix_config = NULL; | ||
25 | gops->ltc.init_cbc = NULL; | ||
26 | gops->ltc.init_fs_state = gm20b_ltc_init_fs_state; | ||
27 | } | ||
diff --git a/drivers/gpu/nvgpu/gp106/ltc_gp106.h b/drivers/gpu/nvgpu/gp106/ltc_gp106.h deleted file mode 100644 index 4720d7a1..00000000 --- a/drivers/gpu/nvgpu/gp106/ltc_gp106.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016, 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 | |||
14 | #ifndef LTC_GP106_H | ||
15 | #define LTC_GP106_H | ||
16 | struct gpu_ops; | ||
17 | |||
18 | void gp106_init_ltc(struct gpu_ops *gops); | ||
19 | #endif | ||