diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/fb_gp10b.c | 18 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/fb_gp10b.h | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 22 |
3 files changed, 32 insertions, 18 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/fb_gp10b.c b/drivers/gpu/nvgpu/gp10b/fb_gp10b.c index 8ba9ff8e..775dc5c9 100644 --- a/drivers/gpu/nvgpu/gp10b/fb_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/fb_gp10b.c | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | #include <nvgpu/hw/gp10b/hw_gmmu_gp10b.h> | 21 | #include <nvgpu/hw/gp10b/hw_gmmu_gp10b.h> |
22 | 22 | ||
23 | static noinline_for_stack void gp10b_init_uncompressed_kind_map(void) | 23 | noinline_for_stack void gp10b_init_uncompressed_kind_map(void) |
24 | { | 24 | { |
25 | int i; | 25 | int i; |
26 | 26 | ||
@@ -438,7 +438,7 @@ static noinline_for_stack bool gp10b_kind_zbc(u8 k) | |||
438 | k <= gmmu_pte_kind_c128_ms8_ms16_2cr_v()); | 438 | k <= gmmu_pte_kind_c128_ms8_ms16_2cr_v()); |
439 | } | 439 | } |
440 | 440 | ||
441 | static void gp10b_init_kind_attr(void) | 441 | void gp10b_init_kind_attr(void) |
442 | { | 442 | { |
443 | u16 k; | 443 | u16 k; |
444 | 444 | ||
@@ -456,22 +456,12 @@ static void gp10b_init_kind_attr(void) | |||
456 | } | 456 | } |
457 | } | 457 | } |
458 | 458 | ||
459 | static unsigned int gp10b_fb_compression_page_size(struct gk20a *g) | 459 | unsigned int gp10b_fb_compression_page_size(struct gk20a *g) |
460 | { | 460 | { |
461 | return SZ_64K; | 461 | return SZ_64K; |
462 | } | 462 | } |
463 | 463 | ||
464 | static unsigned int gp10b_fb_compressible_page_size(struct gk20a *g) | 464 | unsigned int gp10b_fb_compressible_page_size(struct gk20a *g) |
465 | { | 465 | { |
466 | return SZ_4K; | 466 | return SZ_4K; |
467 | } | 467 | } |
468 | |||
469 | void gp10b_init_fb(struct gpu_ops *gops) | ||
470 | { | ||
471 | gm20b_init_fb(gops); | ||
472 | gops->fb.compression_page_size = gp10b_fb_compression_page_size; | ||
473 | gops->fb.compressible_page_size = gp10b_fb_compressible_page_size; | ||
474 | |||
475 | gp10b_init_uncompressed_kind_map(); | ||
476 | gp10b_init_kind_attr(); | ||
477 | } | ||
diff --git a/drivers/gpu/nvgpu/gp10b/fb_gp10b.h b/drivers/gpu/nvgpu/gp10b/fb_gp10b.h index 76efd331..626cf54d 100644 --- a/drivers/gpu/nvgpu/gp10b/fb_gp10b.h +++ b/drivers/gpu/nvgpu/gp10b/fb_gp10b.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GP10B FB | 2 | * GP10B FB |
3 | * | 3 | * |
4 | * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify it | 6 | * This program is free software; you can redistribute it and/or modify it |
7 | * under the terms and conditions of the GNU General Public License, | 7 | * under the terms and conditions of the GNU General Public License, |
@@ -15,7 +15,11 @@ | |||
15 | 15 | ||
16 | #ifndef _NVGPU_GP10B_FB | 16 | #ifndef _NVGPU_GP10B_FB |
17 | #define _NVGPU_GP10B_FB | 17 | #define _NVGPU_GP10B_FB |
18 | struct gpu_ops; | 18 | struct gk20a; |
19 | |||
20 | noinline_for_stack void gp10b_init_uncompressed_kind_map(void); | ||
21 | void gp10b_init_kind_attr(void); | ||
22 | unsigned int gp10b_fb_compression_page_size(struct gk20a *g); | ||
23 | unsigned int gp10b_fb_compressible_page_size(struct gk20a *g); | ||
19 | 24 | ||
20 | void gp10b_init_fb(struct gpu_ops *gops); | ||
21 | #endif | 25 | #endif |
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index 197c4fad..b0871155 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.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/gr_gp10b.h" | 29 | #include "gp10b/gr_gp10b.h" |
29 | #include "gp10b/fecs_trace_gp10b.h" | 30 | #include "gp10b/fecs_trace_gp10b.h" |
@@ -47,6 +48,7 @@ | |||
47 | #include "gm20b/pmu_gm20b.h" | 48 | #include "gm20b/pmu_gm20b.h" |
48 | #include "gm20b/clk_gm20b.h" | 49 | #include "gm20b/clk_gm20b.h" |
49 | #include "gm20b/fifo_gm20b.h" | 50 | #include "gm20b/fifo_gm20b.h" |
51 | #include "gm20b/fb_gm20b.h" | ||
50 | 52 | ||
51 | #include "gp10b.h" | 53 | #include "gp10b.h" |
52 | #include "hal_gp10b.h" | 54 | #include "hal_gp10b.h" |
@@ -170,6 +172,21 @@ static const struct gpu_ops gp10b_ops = { | |||
170 | .isr_stall = gp10b_ce_isr, | 172 | .isr_stall = gp10b_ce_isr, |
171 | .isr_nonstall = gp10b_ce_nonstall_isr, | 173 | .isr_nonstall = gp10b_ce_nonstall_isr, |
172 | }, | 174 | }, |
175 | .fb = { | ||
176 | .reset = fb_gk20a_reset, | ||
177 | .init_hw = gk20a_fb_init_hw, | ||
178 | .init_fs_state = fb_gm20b_init_fs_state, | ||
179 | .set_mmu_page_size = gm20b_fb_set_mmu_page_size, | ||
180 | .set_use_full_comp_tag_line = | ||
181 | gm20b_fb_set_use_full_comp_tag_line, | ||
182 | .compression_page_size = gp10b_fb_compression_page_size, | ||
183 | .compressible_page_size = gp10b_fb_compressible_page_size, | ||
184 | .vpr_info_fetch = gm20b_fb_vpr_info_fetch, | ||
185 | .dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info, | ||
186 | .is_debug_mode_enabled = gm20b_fb_debug_mode_enabled, | ||
187 | .set_debug_mode = gm20b_fb_set_debug_mode, | ||
188 | .tlb_invalidate = gk20a_fb_tlb_invalidate, | ||
189 | }, | ||
173 | .clock_gating = { | 190 | .clock_gating = { |
174 | .slcg_bus_load_gating_prod = | 191 | .slcg_bus_load_gating_prod = |
175 | gp10b_slcg_bus_load_gating_prod, | 192 | gp10b_slcg_bus_load_gating_prod, |
@@ -405,6 +422,7 @@ int gp10b_init_hal(struct gk20a *g) | |||
405 | 422 | ||
406 | gops->ltc = gp10b_ops.ltc; | 423 | gops->ltc = gp10b_ops.ltc; |
407 | gops->ce2 = gp10b_ops.ce2; | 424 | gops->ce2 = gp10b_ops.ce2; |
425 | gops->fb = gp10b_ops.fb; | ||
408 | gops->clock_gating = gp10b_ops.clock_gating; | 426 | gops->clock_gating = gp10b_ops.clock_gating; |
409 | gops->fifo = gp10b_ops.fifo; | 427 | gops->fifo = gp10b_ops.fifo; |
410 | gops->gr_ctx = gp10b_ops.gr_ctx; | 428 | gops->gr_ctx = gp10b_ops.gr_ctx; |
@@ -471,10 +489,12 @@ int gp10b_init_hal(struct gk20a *g) | |||
471 | 489 | ||
472 | g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; | 490 | g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; |
473 | gp10b_init_gr(g); | 491 | gp10b_init_gr(g); |
474 | gp10b_init_fb(gops); | ||
475 | gp10b_init_mm(gops); | 492 | gp10b_init_mm(gops); |
476 | gp10b_init_pmu_ops(g); | 493 | gp10b_init_pmu_ops(g); |
477 | 494 | ||
495 | gp10b_init_uncompressed_kind_map(); | ||
496 | gp10b_init_kind_attr(); | ||
497 | |||
478 | g->name = "gp10b"; | 498 | g->name = "gp10b"; |
479 | 499 | ||
480 | c->twod_class = FERMI_TWOD_A; | 500 | c->twod_class = FERMI_TWOD_A; |