summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b
diff options
context:
space:
mode:
authorSunny He <suhe@nvidia.com>2017-08-11 17:43:28 -0400
committerShu Zhong <shuz@nvidia.com>2017-08-11 17:57:26 -0400
commit36c07aaf5da4d0e739c5143ed00d4ca8a2263ce1 (patch)
tree2ed7e74b2ff0b3f8dc040e981f495d18f10cab4c /drivers/gpu/nvgpu/gp10b
parentf8399cfa553b6fb6d82c7fa762c372f03bf59d5f (diff)
Revert "gpu: nvgpu: Reorg fb HAL initialization"
Conflicts with gv100 changes This reverts commit 63b74d4b768e0c96367d4983fdd8f1db1d317d01. Change-Id: I5e6a1c93ff613daaa100dee436f4941af74f0ac4 Signed-off-by: Sunny He <suhe@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1537671 Reviewed-by: Shu Zhong <shuz@nvidia.com> Tested-by: Shu Zhong <shuz@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r--drivers/gpu/nvgpu/gp10b/fb_gp10b.c18
-rw-r--r--drivers/gpu/nvgpu/gp10b/fb_gp10b.h10
-rw-r--r--drivers/gpu/nvgpu/gp10b/hal_gp10b.c22
3 files changed, 18 insertions, 32 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/fb_gp10b.c b/drivers/gpu/nvgpu/gp10b/fb_gp10b.c
index 775dc5c9..8ba9ff8e 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
23noinline_for_stack void gp10b_init_uncompressed_kind_map(void) 23static 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
441void gp10b_init_kind_attr(void) 441static void gp10b_init_kind_attr(void)
442{ 442{
443 u16 k; 443 u16 k;
444 444
@@ -456,12 +456,22 @@ void gp10b_init_kind_attr(void)
456 } 456 }
457} 457}
458 458
459unsigned int gp10b_fb_compression_page_size(struct gk20a *g) 459static unsigned int gp10b_fb_compression_page_size(struct gk20a *g)
460{ 460{
461 return SZ_64K; 461 return SZ_64K;
462} 462}
463 463
464unsigned int gp10b_fb_compressible_page_size(struct gk20a *g) 464static unsigned int gp10b_fb_compressible_page_size(struct gk20a *g)
465{ 465{
466 return SZ_4K; 466 return SZ_4K;
467} 467}
468
469void 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 626cf54d..76efd331 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-2017, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2014, 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,11 +15,7 @@
15 15
16#ifndef _NVGPU_GP10B_FB 16#ifndef _NVGPU_GP10B_FB
17#define _NVGPU_GP10B_FB 17#define _NVGPU_GP10B_FB
18struct gk20a; 18struct gpu_ops;
19
20noinline_for_stack void gp10b_init_uncompressed_kind_map(void);
21void gp10b_init_kind_attr(void);
22unsigned int gp10b_fb_compression_page_size(struct gk20a *g);
23unsigned int gp10b_fb_compressible_page_size(struct gk20a *g);
24 19
20void gp10b_init_fb(struct gpu_ops *gops);
25#endif 21#endif
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
index b0871155..197c4fad 100644
--- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
@@ -24,7 +24,6 @@
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"
28 27
29#include "gp10b/gr_gp10b.h" 28#include "gp10b/gr_gp10b.h"
30#include "gp10b/fecs_trace_gp10b.h" 29#include "gp10b/fecs_trace_gp10b.h"
@@ -48,7 +47,6 @@
48#include "gm20b/pmu_gm20b.h" 47#include "gm20b/pmu_gm20b.h"
49#include "gm20b/clk_gm20b.h" 48#include "gm20b/clk_gm20b.h"
50#include "gm20b/fifo_gm20b.h" 49#include "gm20b/fifo_gm20b.h"
51#include "gm20b/fb_gm20b.h"
52 50
53#include "gp10b.h" 51#include "gp10b.h"
54#include "hal_gp10b.h" 52#include "hal_gp10b.h"
@@ -172,21 +170,6 @@ static const struct gpu_ops gp10b_ops = {
172 .isr_stall = gp10b_ce_isr, 170 .isr_stall = gp10b_ce_isr,
173 .isr_nonstall = gp10b_ce_nonstall_isr, 171 .isr_nonstall = gp10b_ce_nonstall_isr,
174 }, 172 },
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 },
190 .clock_gating = { 173 .clock_gating = {
191 .slcg_bus_load_gating_prod = 174 .slcg_bus_load_gating_prod =
192 gp10b_slcg_bus_load_gating_prod, 175 gp10b_slcg_bus_load_gating_prod,
@@ -422,7 +405,6 @@ int gp10b_init_hal(struct gk20a *g)
422 405
423 gops->ltc = gp10b_ops.ltc; 406 gops->ltc = gp10b_ops.ltc;
424 gops->ce2 = gp10b_ops.ce2; 407 gops->ce2 = gp10b_ops.ce2;
425 gops->fb = gp10b_ops.fb;
426 gops->clock_gating = gp10b_ops.clock_gating; 408 gops->clock_gating = gp10b_ops.clock_gating;
427 gops->fifo = gp10b_ops.fifo; 409 gops->fifo = gp10b_ops.fifo;
428 gops->gr_ctx = gp10b_ops.gr_ctx; 410 gops->gr_ctx = gp10b_ops.gr_ctx;
@@ -489,12 +471,10 @@ int gp10b_init_hal(struct gk20a *g)
489 471
490 g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT; 472 g->bootstrap_owner = LSF_BOOTSTRAP_OWNER_DEFAULT;
491 gp10b_init_gr(g); 473 gp10b_init_gr(g);
474 gp10b_init_fb(gops);
492 gp10b_init_mm(gops); 475 gp10b_init_mm(gops);
493 gp10b_init_pmu_ops(g); 476 gp10b_init_pmu_ops(g);
494 477
495 gp10b_init_uncompressed_kind_map();
496 gp10b_init_kind_attr();
497
498 g->name = "gp10b"; 478 g->name = "gp10b";
499 479
500 c->twod_class = FERMI_TWOD_A; 480 c->twod_class = FERMI_TWOD_A;