From 36c07aaf5da4d0e739c5143ed00d4ca8a2263ce1 Mon Sep 17 00:00:00 2001 From: Sunny He Date: Fri, 11 Aug 2017 14:43:28 -0700 Subject: Revert "gpu: nvgpu: Reorg fb HAL initialization" Conflicts with gv100 changes This reverts commit 63b74d4b768e0c96367d4983fdd8f1db1d317d01. Change-Id: I5e6a1c93ff613daaa100dee436f4941af74f0ac4 Signed-off-by: Sunny He Reviewed-on: https://git-master.nvidia.com/r/1537671 Reviewed-by: Shu Zhong Tested-by: Shu Zhong --- drivers/gpu/nvgpu/gp106/fb_gp106.c | 10 +++++++++- drivers/gpu/nvgpu/gp106/fb_gp106.h | 4 ++-- drivers/gpu/nvgpu/gp106/hal_gp106.c | 23 +---------------------- 3 files changed, 12 insertions(+), 25 deletions(-) (limited to 'drivers/gpu/nvgpu/gp106') diff --git a/drivers/gpu/nvgpu/gp106/fb_gp106.c b/drivers/gpu/nvgpu/gp106/fb_gp106.c index 25055e79..5be7062d 100644 --- a/drivers/gpu/nvgpu/gp106/fb_gp106.c +++ b/drivers/gpu/nvgpu/gp106/fb_gp106.c @@ -21,7 +21,7 @@ #define HW_SCRUB_TIMEOUT_DEFAULT 100 /* usec */ #define HW_SCRUB_TIMEOUT_MAX 2000000 /* usec */ -void gp106_fb_reset(struct gk20a *g) +static void gp106_fb_reset(struct gk20a *g) { u32 val; @@ -40,3 +40,11 @@ void gp106_fb_reset(struct gk20a *g) val &= ~fb_mmu_priv_level_mask_write_violation_m(); gk20a_writel(g, fb_mmu_priv_level_mask_r(), val); } + +void gp106_init_fb(struct gpu_ops *gops) +{ + gp10b_init_fb(gops); + + gops->fb.init_fs_state = NULL; + gops->fb.reset = gp106_fb_reset; +} diff --git a/drivers/gpu/nvgpu/gp106/fb_gp106.h b/drivers/gpu/nvgpu/gp106/fb_gp106.h index 99a70d7b..87b371e1 100644 --- a/drivers/gpu/nvgpu/gp106/fb_gp106.h +++ b/drivers/gpu/nvgpu/gp106/fb_gp106.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -15,5 +15,5 @@ #define FB_GP106_H struct gpu_ops; -void gp106_fb_reset(struct gk20a *g); +void gp106_init_fb(struct gpu_ops *gops); #endif diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 361a7b0f..4a891a82 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -24,7 +24,6 @@ #include "gk20a/flcn_gk20a.h" #include "gk20a/regops_gk20a.h" #include "gk20a/mc_gk20a.h" -#include "gk20a/fb_gk20a.h" #include "gp10b/ltc_gp10b.h" #include "gp10b/gr_gp10b.h" @@ -36,7 +35,6 @@ #include "gp10b/cde_gp10b.h" #include "gp10b/priv_ring_gp10b.h" #include "gp10b/fifo_gp10b.h" -#include "gp10b/fb_gp10b.h" #include "gp106/fifo_gp106.h" #include "gp106/regops_gp106.h" @@ -45,7 +43,6 @@ #include "gm20b/gr_gm20b.h" #include "gm20b/fifo_gm20b.h" #include "gm20b/pmu_gm20b.h" -#include "gm20b/fb_gm20b.h" #include "gp106/clk_gp106.h" #include "gp106/clk_arb_gp106.h" @@ -213,21 +210,6 @@ static const struct gpu_ops gp106_ops = { .isr_stall = gp10b_ce_isr, .isr_nonstall = gp10b_ce_nonstall_isr, }, - .fb = { - .reset = gp106_fb_reset, - .init_hw = gk20a_fb_init_hw, - .init_fs_state = NULL, - .set_mmu_page_size = gm20b_fb_set_mmu_page_size, - .set_use_full_comp_tag_line = - gm20b_fb_set_use_full_comp_tag_line, - .compression_page_size = gp10b_fb_compression_page_size, - .compressible_page_size = gp10b_fb_compressible_page_size, - .vpr_info_fetch = gm20b_fb_vpr_info_fetch, - .dump_vpr_wpr_info = gm20b_fb_dump_vpr_wpr_info, - .is_debug_mode_enabled = gm20b_fb_debug_mode_enabled, - .set_debug_mode = gm20b_fb_set_debug_mode, - .tlb_invalidate = gk20a_fb_tlb_invalidate, - }, .clock_gating = { .slcg_bus_load_gating_prod = gp106_slcg_bus_load_gating_prod, @@ -497,7 +479,6 @@ int gp106_init_hal(struct gk20a *g) gops->ltc = gp106_ops.ltc; gops->ce2 = gp106_ops.ce2; - gops->fb = gp106_ops.fb; gops->clock_gating = gp106_ops.clock_gating; gops->fifo = gp106_ops.fifo; gops->gr_ctx = gp106_ops.gr_ctx; @@ -543,12 +524,10 @@ int gp106_init_hal(struct gk20a *g) g->bootstrap_owner = LSF_FALCON_ID_SEC2; gp106_init_gr(g); + gp106_init_fb(gops); gp106_init_mm(gops); gp106_init_pmu_ops(g); - gp10b_init_uncompressed_kind_map(); - gp10b_init_kind_attr(); - g->name = "gp10x"; c->twod_class = FERMI_TWOD_A; -- cgit v1.2.2