diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b')
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fb_gv11b.c | 25 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/fb_gv11b.h | 11 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv11b/hal_gv11b.c | 25 |
3 files changed, 22 insertions, 39 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c index 384dfb20..35227576 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.c | |||
@@ -75,7 +75,7 @@ static void gv11b_init_nvlink_soc_credits(struct gk20a *g) | |||
75 | 75 | ||
76 | } | 76 | } |
77 | 77 | ||
78 | void gv11b_fb_init_fs_state(struct gk20a *g) | 78 | static void gv11b_fb_init_fs_state(struct gk20a *g) |
79 | { | 79 | { |
80 | nvgpu_log(g, gpu_dbg_fn, "initialize gv11b fb"); | 80 | nvgpu_log(g, gpu_dbg_fn, "initialize gv11b fb"); |
81 | 81 | ||
@@ -87,7 +87,7 @@ void gv11b_fb_init_fs_state(struct gk20a *g) | |||
87 | gk20a_readl(g, fb_mmu_num_active_ltcs_r()))); | 87 | gk20a_readl(g, fb_mmu_num_active_ltcs_r()))); |
88 | } | 88 | } |
89 | 89 | ||
90 | void gv11b_fb_init_cbc(struct gk20a *g, struct gr_gk20a *gr) | 90 | static void gv11b_fb_init_cbc(struct gk20a *g, struct gr_gk20a *gr) |
91 | { | 91 | { |
92 | u32 max_size = gr->max_comptag_mem; | 92 | u32 max_size = gr->max_comptag_mem; |
93 | /* one tag line covers 64KB */ | 93 | /* one tag line covers 64KB */ |
@@ -137,7 +137,7 @@ void gv11b_fb_init_cbc(struct gk20a *g, struct gr_gk20a *gr) | |||
137 | 137 | ||
138 | } | 138 | } |
139 | 139 | ||
140 | void gv11b_fb_reset(struct gk20a *g) | 140 | static void gv11b_fb_reset(struct gk20a *g) |
141 | { | 141 | { |
142 | u32 val; | 142 | u32 val; |
143 | 143 | ||
@@ -251,7 +251,7 @@ static const char *const gpc_client_descs_gv11b[] = { | |||
251 | "t1 36", "t1 37", "t1 38", "t1 39", | 251 | "t1 36", "t1 37", "t1 38", "t1 39", |
252 | }; | 252 | }; |
253 | 253 | ||
254 | noinline_for_stack void gv11b_init_uncompressed_kind_map(void) | 254 | static noinline_for_stack void gv11b_init_uncompressed_kind_map(void) |
255 | { | 255 | { |
256 | int i; | 256 | int i; |
257 | 257 | ||
@@ -672,7 +672,7 @@ static noinline_for_stack bool gv11b_kind_zbc(u8 k) | |||
672 | k <= gmmu_pte_kind_c128_ms8_ms16_2cr_v()); | 672 | k <= gmmu_pte_kind_c128_ms8_ms16_2cr_v()); |
673 | } | 673 | } |
674 | 674 | ||
675 | void gv11b_init_kind_attr(void) | 675 | static void gv11b_init_kind_attr(void) |
676 | { | 676 | { |
677 | u16 k; | 677 | u16 k; |
678 | 678 | ||
@@ -1815,7 +1815,7 @@ static void gv11b_fb_handle_mmu_fault(struct gk20a *g, u32 niso_intr) | |||
1815 | fb_mmu_fault_status_valid_clear_f()); | 1815 | fb_mmu_fault_status_valid_clear_f()); |
1816 | } | 1816 | } |
1817 | 1817 | ||
1818 | void gv11b_fb_hub_isr(struct gk20a *g) | 1818 | static void gv11b_fb_hub_isr(struct gk20a *g) |
1819 | { | 1819 | { |
1820 | u32 status, niso_intr; | 1820 | u32 status, niso_intr; |
1821 | 1821 | ||
@@ -1967,3 +1967,16 @@ static int gv11b_fb_fix_page_fault(struct gk20a *g, | |||
1967 | pte[1], pte[0]); | 1967 | pte[1], pte[0]); |
1968 | return err; | 1968 | return err; |
1969 | } | 1969 | } |
1970 | |||
1971 | void gv11b_init_fb(struct gpu_ops *gops) | ||
1972 | { | ||
1973 | gp10b_init_fb(gops); | ||
1974 | gops->fb.hub_isr = gv11b_fb_hub_isr; | ||
1975 | gops->fb.reset = gv11b_fb_reset; | ||
1976 | gops->fb.init_fs_state = gv11b_fb_init_fs_state; | ||
1977 | gops->fb.init_cbc = gv11b_fb_init_cbc; | ||
1978 | |||
1979 | gv11b_init_uncompressed_kind_map(); | ||
1980 | gv11b_init_kind_attr(); | ||
1981 | |||
1982 | } | ||
diff --git a/drivers/gpu/nvgpu/gv11b/fb_gv11b.h b/drivers/gpu/nvgpu/gv11b/fb_gv11b.h index 3e2dd828..39cdfb77 100644 --- a/drivers/gpu/nvgpu/gv11b/fb_gv11b.h +++ b/drivers/gpu/nvgpu/gv11b/fb_gv11b.h | |||
@@ -42,13 +42,9 @@ | |||
42 | #define FAULT_TYPE_OTHER_AND_NONREPLAY 0 | 42 | #define FAULT_TYPE_OTHER_AND_NONREPLAY 0 |
43 | #define FAULT_TYPE_REPLAY 1 | 43 | #define FAULT_TYPE_REPLAY 1 |
44 | 44 | ||
45 | struct gk20a; | 45 | struct gpu_ops; |
46 | |||
47 | void gv11b_fb_init_fs_state(struct gk20a *g); | ||
48 | void gv11b_fb_init_cbc(struct gk20a *g, struct gr_gk20a *gr); | ||
49 | void gv11b_fb_reset(struct gk20a *g); | ||
50 | void gv11b_fb_hub_isr(struct gk20a *g); | ||
51 | 46 | ||
47 | void gv11b_init_fb(struct gpu_ops *gops); | ||
52 | u32 gv11b_fb_is_fault_buf_enabled(struct gk20a *g, | 48 | u32 gv11b_fb_is_fault_buf_enabled(struct gk20a *g, |
53 | unsigned int index); | 49 | unsigned int index); |
54 | void gv11b_fb_fault_buf_set_state_hw(struct gk20a *g, | 50 | void gv11b_fb_fault_buf_set_state_hw(struct gk20a *g, |
@@ -60,7 +56,4 @@ void gv11b_fb_disable_hub_intr(struct gk20a *g, | |||
60 | unsigned int index, unsigned int intr_type); | 56 | unsigned int index, unsigned int intr_type); |
61 | void gv11b_fb_fault_buf_configure_hw(struct gk20a *g, unsigned int index); | 57 | void gv11b_fb_fault_buf_configure_hw(struct gk20a *g, unsigned int index); |
62 | bool gv11b_fb_mmu_fault_pending(struct gk20a *g); | 58 | bool gv11b_fb_mmu_fault_pending(struct gk20a *g); |
63 | |||
64 | noinline_for_stack void gv11b_init_uncompressed_kind_map(void); | ||
65 | void gv11b_init_kind_attr(void); | ||
66 | #endif | 59 | #endif |
diff --git a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c index 9f6c67c1..282aa228 100644 --- a/drivers/gpu/nvgpu/gv11b/hal_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/hal_gv11b.c | |||
@@ -29,11 +29,9 @@ | |||
29 | #include "gk20a/bus_gk20a.h" | 29 | #include "gk20a/bus_gk20a.h" |
30 | #include "gk20a/flcn_gk20a.h" | 30 | #include "gk20a/flcn_gk20a.h" |
31 | #include "gk20a/regops_gk20a.h" | 31 | #include "gk20a/regops_gk20a.h" |
32 | #include "gk20a/fb_gk20a.h" | ||
33 | 32 | ||
34 | #include "gm20b/ltc_gm20b.h" | 33 | #include "gm20b/ltc_gm20b.h" |
35 | #include "gm20b/gr_gm20b.h" | 34 | #include "gm20b/gr_gm20b.h" |
36 | #include "gm20b/fb_gm20b.h" | ||
37 | #include "gm20b/fifo_gm20b.h" | 35 | #include "gm20b/fifo_gm20b.h" |
38 | 36 | ||
39 | #include "gp10b/ltc_gp10b.h" | 37 | #include "gp10b/ltc_gp10b.h" |
@@ -43,7 +41,6 @@ | |||
43 | #include "gp10b/priv_ring_gp10b.h" | 41 | #include "gp10b/priv_ring_gp10b.h" |
44 | #include "gp10b/fifo_gp10b.h" | 42 | #include "gp10b/fifo_gp10b.h" |
45 | #include "gp10b/fecs_trace_gp10b.h" | 43 | #include "gp10b/fecs_trace_gp10b.h" |
46 | #include "gp10b/fb_gp10b.h" | ||
47 | 44 | ||
48 | #include "hal_gv11b.h" | 45 | #include "hal_gv11b.h" |
49 | #include "gr_gv11b.h" | 46 | #include "gr_gv11b.h" |
@@ -178,23 +175,6 @@ static const struct gpu_ops gv11b_ops = { | |||
178 | .isr_nonstall = gp10b_ce_nonstall_isr, | 175 | .isr_nonstall = gp10b_ce_nonstall_isr, |
179 | .get_num_pce = gv11b_ce_get_num_pce, | 176 | .get_num_pce = gv11b_ce_get_num_pce, |
180 | }, | 177 | }, |
181 | .fb = { | ||
182 | .reset = gv11b_fb_reset, | ||
183 | .init_hw = gk20a_fb_init_hw, | ||
184 | .init_fs_state = gv11b_fb_init_fs_state, | ||
185 | .init_cbc = gv11b_fb_init_cbc, | ||
186 | .set_mmu_page_size = gm20b_fb_set_mmu_page_size, | ||
187 | .set_use_full_comp_tag_line = | ||
188 | gm20b_fb_set_use_full_comp_tag_line, | ||
189 | .compression_page_size = gp10b_fb_compression_page_size, | ||
190 | .compressible_page_size = gp10b_fb_compressible_page_size, | ||
191 | .vpr_info_fetch = gm20b_fb_vpr_info_fetch, | ||
192 | .dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info, | ||
193 | .is_debug_mode_enabled = gm20b_fb_debug_mode_enabled, | ||
194 | .set_debug_mode = gm20b_fb_set_debug_mode, | ||
195 | .tlb_invalidate = gk20a_fb_tlb_invalidate, | ||
196 | .hub_isr = gv11b_fb_hub_isr, | ||
197 | }, | ||
198 | .clock_gating = { | 178 | .clock_gating = { |
199 | .slcg_bus_load_gating_prod = | 179 | .slcg_bus_load_gating_prod = |
200 | gv11b_slcg_bus_load_gating_prod, | 180 | gv11b_slcg_bus_load_gating_prod, |
@@ -425,7 +405,6 @@ int gv11b_init_hal(struct gk20a *g) | |||
425 | 405 | ||
426 | gops->ltc = gv11b_ops.ltc; | 406 | gops->ltc = gv11b_ops.ltc; |
427 | gops->ce2 = gv11b_ops.ce2; | 407 | gops->ce2 = gv11b_ops.ce2; |
428 | gops->fb = gv11b_ops.fb; | ||
429 | gops->clock_gating = gv11b_ops.clock_gating; | 408 | gops->clock_gating = gv11b_ops.clock_gating; |
430 | gops->fifo = gv11b_ops.fifo; | 409 | gops->fifo = gv11b_ops.fifo; |
431 | gops->gr_ctx = gv11b_ops.gr_ctx; | 410 | gops->gr_ctx = gv11b_ops.gr_ctx; |
@@ -453,12 +432,10 @@ int gv11b_init_hal(struct gk20a *g) | |||
453 | __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, false); | 432 | __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, false); |
454 | 433 | ||
455 | gv11b_init_gr(g); | 434 | gv11b_init_gr(g); |
435 | gv11b_init_fb(gops); | ||
456 | gv11b_init_mm(gops); | 436 | gv11b_init_mm(gops); |
457 | gv11b_init_pmu_ops(g); | 437 | gv11b_init_pmu_ops(g); |
458 | 438 | ||
459 | gv11b_init_uncompressed_kind_map(); | ||
460 | gv11b_init_kind_attr(); | ||
461 | |||
462 | g->name = "gv11b"; | 439 | g->name = "gv11b"; |
463 | 440 | ||
464 | c->twod_class = FERMI_TWOD_A; | 441 | c->twod_class = FERMI_TWOD_A; |