diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv100')
-rw-r--r-- | drivers/gpu/nvgpu/gv100/fb_gv100.c | 9 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/fb_gv100.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/hal_gv100.c | 28 |
3 files changed, 29 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/gv100/fb_gv100.c b/drivers/gpu/nvgpu/gv100/fb_gv100.c index a3785266..319ebad6 100644 --- a/drivers/gpu/nvgpu/gv100/fb_gv100.c +++ b/drivers/gpu/nvgpu/gv100/fb_gv100.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <nvgpu/gmmu.h> | 21 | #include <nvgpu/gmmu.h> |
22 | 22 | ||
23 | #include "gk20a/gk20a.h" | 23 | #include "gk20a/gk20a.h" |
24 | #include "gv11b/fb_gv11b.h" | ||
25 | #include "gv100/fb_gv100.h" | 24 | #include "gv100/fb_gv100.h" |
26 | 25 | ||
27 | #include <nvgpu/hw/gv100/hw_fb_gv100.h> | 26 | #include <nvgpu/hw/gv100/hw_fb_gv100.h> |
@@ -29,7 +28,7 @@ | |||
29 | #define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */ | 28 | #define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */ |
30 | #define HW_SCRUB_TIMEOUT_MAX 2000000 /* usec */ | 29 | #define HW_SCRUB_TIMEOUT_MAX 2000000 /* usec */ |
31 | 30 | ||
32 | static void gv100_fb_reset(struct gk20a *g) | 31 | void gv100_fb_reset(struct gk20a *g) |
33 | { | 32 | { |
34 | u32 val; | 33 | u32 val; |
35 | int retries = HW_SCRUB_TIMEOUT_MAX / HW_SCRUB_TIMEOUT_DEFAULT; | 34 | int retries = HW_SCRUB_TIMEOUT_MAX / HW_SCRUB_TIMEOUT_DEFAULT; |
@@ -50,9 +49,3 @@ static void gv100_fb_reset(struct gk20a *g) | |||
50 | val &= ~fb_mmu_priv_level_mask_write_violation_m(); | 49 | val &= ~fb_mmu_priv_level_mask_write_violation_m(); |
51 | gk20a_writel(g, fb_mmu_priv_level_mask_r(), val); | 50 | gk20a_writel(g, fb_mmu_priv_level_mask_r(), val); |
52 | } | 51 | } |
53 | |||
54 | void gv100_init_fb(struct gpu_ops *gops) | ||
55 | { | ||
56 | gv11b_init_fb(gops); | ||
57 | gops->fb.reset = gv100_fb_reset; | ||
58 | } | ||
diff --git a/drivers/gpu/nvgpu/gv100/fb_gv100.h b/drivers/gpu/nvgpu/gv100/fb_gv100.h index b234fa13..f3219177 100644 --- a/drivers/gpu/nvgpu/gv100/fb_gv100.h +++ b/drivers/gpu/nvgpu/gv100/fb_gv100.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #ifndef _NVGPU_GV100_FB | 16 | #ifndef _NVGPU_GV100_FB |
17 | #define _NVGPU_GV100_FB | 17 | #define _NVGPU_GV100_FB |
18 | 18 | ||
19 | struct gpu_ops; | 19 | struct gk20a; |
20 | 20 | ||
21 | void gv100_init_fb(struct gpu_ops *gops); | 21 | void gv100_fb_reset(struct gk20a *g); |
22 | #endif | 22 | #endif |
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 337c607f..a2a131da 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -30,10 +30,14 @@ | |||
30 | #include "gk20a/pramin_gk20a.h" | 30 | #include "gk20a/pramin_gk20a.h" |
31 | #include "gk20a/flcn_gk20a.h" | 31 | #include "gk20a/flcn_gk20a.h" |
32 | #include "gk20a/regops_gk20a.h" | 32 | #include "gk20a/regops_gk20a.h" |
33 | #include "gk20a/fb_gk20a.h" | ||
33 | 34 | ||
34 | #include "gm20b/ltc_gm20b.h" | 35 | #include "gm20b/ltc_gm20b.h" |
35 | #include "gm20b/gr_gm20b.h" | 36 | #include "gm20b/gr_gm20b.h" |
36 | #include "gm20b/fifo_gm20b.h" | 37 | #include "gm20b/fifo_gm20b.h" |
38 | #include "gm20b/fb_gm20b.h" | ||
39 | |||
40 | #include "gp10b/fb_gp10b.h" | ||
37 | 41 | ||
38 | #include "gp106/clk_gp106.h" | 42 | #include "gp106/clk_gp106.h" |
39 | #include "gp106/clk_arb_gp106.h" | 43 | #include "gp106/clk_arb_gp106.h" |
@@ -61,7 +65,7 @@ | |||
61 | #include "gv100/gr_ctx_gv100.h" | 65 | #include "gv100/gr_ctx_gv100.h" |
62 | #include "gv100/mm_gv100.h" | 66 | #include "gv100/mm_gv100.h" |
63 | #include "gv11b/pmu_gv11b.h" | 67 | #include "gv11b/pmu_gv11b.h" |
64 | #include "gv100/fb_gv100.h" | 68 | #include "gv11b/fb_gv11b.h" |
65 | #include "gv11b/fifo_gv11b.h" | 69 | #include "gv11b/fifo_gv11b.h" |
66 | #include "gv11b/gv11b_gating_reglist.h" | 70 | #include "gv11b/gv11b_gating_reglist.h" |
67 | #include "gv11b/regops_gv11b.h" | 71 | #include "gv11b/regops_gv11b.h" |
@@ -69,6 +73,7 @@ | |||
69 | 73 | ||
70 | #include "gv100.h" | 74 | #include "gv100.h" |
71 | #include "hal_gv100.h" | 75 | #include "hal_gv100.h" |
76 | #include "gv100/fb_gv100.h" | ||
72 | 77 | ||
73 | #include <nvgpu/debug.h> | 78 | #include <nvgpu/debug.h> |
74 | #include <nvgpu/enabled.h> | 79 | #include <nvgpu/enabled.h> |
@@ -200,6 +205,23 @@ static const struct gpu_ops gv100_ops = { | |||
200 | .isr_nonstall = gp10b_ce_nonstall_isr, | 205 | .isr_nonstall = gp10b_ce_nonstall_isr, |
201 | .get_num_pce = gv11b_ce_get_num_pce, | 206 | .get_num_pce = gv11b_ce_get_num_pce, |
202 | }, | 207 | }, |
208 | .fb = { | ||
209 | .reset = gv100_fb_reset, | ||
210 | .init_hw = gk20a_fb_init_hw, | ||
211 | .init_fs_state = gv11b_fb_init_fs_state, | ||
212 | .init_cbc = gv11b_fb_init_cbc, | ||
213 | .set_mmu_page_size = gm20b_fb_set_mmu_page_size, | ||
214 | .set_use_full_comp_tag_line = | ||
215 | gm20b_fb_set_use_full_comp_tag_line, | ||
216 | .compression_page_size = gp10b_fb_compression_page_size, | ||
217 | .compressible_page_size = gp10b_fb_compressible_page_size, | ||
218 | .vpr_info_fetch = gm20b_fb_vpr_info_fetch, | ||
219 | .dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info, | ||
220 | .is_debug_mode_enabled = gm20b_fb_debug_mode_enabled, | ||
221 | .set_debug_mode = gm20b_fb_set_debug_mode, | ||
222 | .tlb_invalidate = gk20a_fb_tlb_invalidate, | ||
223 | .hub_isr = gv11b_fb_hub_isr, | ||
224 | }, | ||
203 | .fifo = { | 225 | .fifo = { |
204 | .init_fifo_setup_hw = gv11b_init_fifo_setup_hw, | 226 | .init_fifo_setup_hw = gv11b_init_fifo_setup_hw, |
205 | .bind_channel = channel_gm20b_bind, | 227 | .bind_channel = channel_gm20b_bind, |
@@ -424,10 +446,12 @@ int gv100_init_hal(struct gk20a *g) | |||
424 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; | 446 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; |
425 | 447 | ||
426 | gv11b_init_gr(g); | 448 | gv11b_init_gr(g); |
427 | gv100_init_fb(gops); | ||
428 | gv100_init_mm(gops); | 449 | gv100_init_mm(gops); |
429 | gp106_init_pmu_ops(g); | 450 | gp106_init_pmu_ops(g); |
430 | 451 | ||
452 | gv11b_init_uncompressed_kind_map(); | ||
453 | gv11b_init_kind_attr(); | ||
454 | |||
431 | g->name = "gv10x"; | 455 | g->name = "gv10x"; |
432 | 456 | ||
433 | c->twod_class = FERMI_TWOD_A; | 457 | c->twod_class = FERMI_TWOD_A; |