diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp106')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/fb_gp106.c | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/fb_gp106.h | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 23 |
3 files changed, 25 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/gp106/fb_gp106.c b/drivers/gpu/nvgpu/gp106/fb_gp106.c index 5be7062d..25055e79 100644 --- a/drivers/gpu/nvgpu/gp106/fb_gp106.c +++ b/drivers/gpu/nvgpu/gp106/fb_gp106.c | |||
@@ -21,7 +21,7 @@ | |||
21 | #define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */ | 21 | #define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */ |
22 | #define HW_SCRUB_TIMEOUT_MAX 2000000 /* usec */ | 22 | #define HW_SCRUB_TIMEOUT_MAX 2000000 /* usec */ |
23 | 23 | ||
24 | static void gp106_fb_reset(struct gk20a *g) | 24 | void gp106_fb_reset(struct gk20a *g) |
25 | { | 25 | { |
26 | u32 val; | 26 | u32 val; |
27 | 27 | ||
@@ -40,11 +40,3 @@ static void gp106_fb_reset(struct gk20a *g) | |||
40 | val &= ~fb_mmu_priv_level_mask_write_violation_m(); | 40 | val &= ~fb_mmu_priv_level_mask_write_violation_m(); |
41 | gk20a_writel(g, fb_mmu_priv_level_mask_r(), val); | 41 | gk20a_writel(g, fb_mmu_priv_level_mask_r(), val); |
42 | } | 42 | } |
43 | |||
44 | void gp106_init_fb(struct gpu_ops *gops) | ||
45 | { | ||
46 | gp10b_init_fb(gops); | ||
47 | |||
48 | gops->fb.init_fs_state = NULL; | ||
49 | gops->fb.reset = gp106_fb_reset; | ||
50 | } | ||
diff --git a/drivers/gpu/nvgpu/gp106/fb_gp106.h b/drivers/gpu/nvgpu/gp106/fb_gp106.h index 87b371e1..99a70d7b 100644 --- a/drivers/gpu/nvgpu/gp106/fb_gp106.h +++ b/drivers/gpu/nvgpu/gp106/fb_gp106.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | 2 | * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify it | 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, | 5 | * under the terms and conditions of the GNU General Public License, |
@@ -15,5 +15,5 @@ | |||
15 | #define FB_GP106_H | 15 | #define FB_GP106_H |
16 | struct gpu_ops; | 16 | struct gpu_ops; |
17 | 17 | ||
18 | void gp106_init_fb(struct gpu_ops *gops); | 18 | void gp106_fb_reset(struct gk20a *g); |
19 | #endif | 19 | #endif |
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 4a891a82..361a7b0f 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "gk20a/flcn_gk20a.h" | 24 | #include "gk20a/flcn_gk20a.h" |
25 | #include "gk20a/regops_gk20a.h" | 25 | #include "gk20a/regops_gk20a.h" |
26 | #include "gk20a/mc_gk20a.h" | 26 | #include "gk20a/mc_gk20a.h" |
27 | #include "gk20a/fb_gk20a.h" | ||
27 | 28 | ||
28 | #include "gp10b/ltc_gp10b.h" | 29 | #include "gp10b/ltc_gp10b.h" |
29 | #include "gp10b/gr_gp10b.h" | 30 | #include "gp10b/gr_gp10b.h" |
@@ -35,6 +36,7 @@ | |||
35 | #include "gp10b/cde_gp10b.h" | 36 | #include "gp10b/cde_gp10b.h" |
36 | #include "gp10b/priv_ring_gp10b.h" | 37 | #include "gp10b/priv_ring_gp10b.h" |
37 | #include "gp10b/fifo_gp10b.h" | 38 | #include "gp10b/fifo_gp10b.h" |
39 | #include "gp10b/fb_gp10b.h" | ||
38 | 40 | ||
39 | #include "gp106/fifo_gp106.h" | 41 | #include "gp106/fifo_gp106.h" |
40 | #include "gp106/regops_gp106.h" | 42 | #include "gp106/regops_gp106.h" |
@@ -43,6 +45,7 @@ | |||
43 | #include "gm20b/gr_gm20b.h" | 45 | #include "gm20b/gr_gm20b.h" |
44 | #include "gm20b/fifo_gm20b.h" | 46 | #include "gm20b/fifo_gm20b.h" |
45 | #include "gm20b/pmu_gm20b.h" | 47 | #include "gm20b/pmu_gm20b.h" |
48 | #include "gm20b/fb_gm20b.h" | ||
46 | 49 | ||
47 | #include "gp106/clk_gp106.h" | 50 | #include "gp106/clk_gp106.h" |
48 | #include "gp106/clk_arb_gp106.h" | 51 | #include "gp106/clk_arb_gp106.h" |
@@ -210,6 +213,21 @@ static const struct gpu_ops gp106_ops = { | |||
210 | .isr_stall = gp10b_ce_isr, | 213 | .isr_stall = gp10b_ce_isr, |
211 | .isr_nonstall = gp10b_ce_nonstall_isr, | 214 | .isr_nonstall = gp10b_ce_nonstall_isr, |
212 | }, | 215 | }, |
216 | .fb = { | ||
217 | .reset = gp106_fb_reset, | ||
218 | .init_hw = gk20a_fb_init_hw, | ||
219 | .init_fs_state = NULL, | ||
220 | .set_mmu_page_size = gm20b_fb_set_mmu_page_size, | ||
221 | .set_use_full_comp_tag_line = | ||
222 | gm20b_fb_set_use_full_comp_tag_line, | ||
223 | .compression_page_size = gp10b_fb_compression_page_size, | ||
224 | .compressible_page_size = gp10b_fb_compressible_page_size, | ||
225 | .vpr_info_fetch = gm20b_fb_vpr_info_fetch, | ||
226 | .dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info, | ||
227 | .is_debug_mode_enabled = gm20b_fb_debug_mode_enabled, | ||
228 | .set_debug_mode = gm20b_fb_set_debug_mode, | ||
229 | .tlb_invalidate = gk20a_fb_tlb_invalidate, | ||
230 | }, | ||
213 | .clock_gating = { | 231 | .clock_gating = { |
214 | .slcg_bus_load_gating_prod = | 232 | .slcg_bus_load_gating_prod = |
215 | gp106_slcg_bus_load_gating_prod, | 233 | gp106_slcg_bus_load_gating_prod, |
@@ -479,6 +497,7 @@ int gp106_init_hal(struct gk20a *g) | |||
479 | 497 | ||
480 | gops->ltc = gp106_ops.ltc; | 498 | gops->ltc = gp106_ops.ltc; |
481 | gops->ce2 = gp106_ops.ce2; | 499 | gops->ce2 = gp106_ops.ce2; |
500 | gops->fb = gp106_ops.fb; | ||
482 | gops->clock_gating = gp106_ops.clock_gating; | 501 | gops->clock_gating = gp106_ops.clock_gating; |
483 | gops->fifo = gp106_ops.fifo; | 502 | gops->fifo = gp106_ops.fifo; |
484 | gops->gr_ctx = gp106_ops.gr_ctx; | 503 | gops->gr_ctx = gp106_ops.gr_ctx; |
@@ -524,10 +543,12 @@ int gp106_init_hal(struct gk20a *g) | |||
524 | 543 | ||
525 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; | 544 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; |
526 | gp106_init_gr(g); | 545 | gp106_init_gr(g); |
527 | gp106_init_fb(gops); | ||
528 | gp106_init_mm(gops); | 546 | gp106_init_mm(gops); |
529 | gp106_init_pmu_ops(g); | 547 | gp106_init_pmu_ops(g); |
530 | 548 | ||
549 | gp10b_init_uncompressed_kind_map(); | ||
550 | gp10b_init_kind_attr(); | ||
551 | |||
531 | g->name = "gp10x"; | 552 | g->name = "gp10x"; |
532 | 553 | ||
533 | c->twod_class = FERMI_TWOD_A; | 554 | c->twod_class = FERMI_TWOD_A; |