From 440cda8a6797a0c8c423a5e3357a458ed4dfad07 Mon Sep 17 00:00:00 2001 From: Vaikundanathan S Date: Wed, 25 Apr 2018 12:35:55 +0530 Subject: gpu:nvgpu: Add option for split rail support Add gops to check whether split rail is suported in the chip Bug 200399373 Change-Id: I5e955127e06d1fbc9b3eca0a895afa0a06f39d91 Signed-off-by: Vaikundanathan S Reviewed-on: https://git-master.nvidia.com/r/1702130 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/clk/clk_domain.c | 5 ++++- drivers/gpu/nvgpu/gk20a/gk20a.h | 1 + drivers/gpu/nvgpu/gp106/hal_gp106.c | 1 + drivers/gpu/nvgpu/gv100/hal_gv100.c | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/clk/clk_domain.c b/drivers/gpu/nvgpu/clk/clk_domain.c index f306cf56..822bba2c 100644 --- a/drivers/gpu/nvgpu/clk/clk_domain.c +++ b/drivers/gpu/nvgpu/clk/clk_domain.c @@ -131,7 +131,10 @@ static u32 _clk_domains_pmudatainit_3x(struct gk20a *g, pset->b_debug_mode = false; pset->b_enforce_vf_monotonicity = pdomains->b_enforce_vf_monotonicity; pset->b_enforce_vf_smoothening = pdomains->b_enforce_vf_smoothening; - pset->volt_rails_max = 2; + if (g->ops.clk.split_rail_support) + pset->volt_rails_max = 2; + else + pset->volt_rails_max = 1; status = boardobjgrpmask_export( &pdomains->master_domains_mask.super, pdomains->master_domains_mask.super.bitcount, diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index e29d7b07..38952daf 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -1032,6 +1032,7 @@ struct gpu_ops { int (*mclk_init)(struct gk20a *g); void (*mclk_deinit)(struct gk20a *g); int (*mclk_change)(struct gk20a *g, u16 val); + bool split_rail_support; } clk; struct { u32 (*get_arbiter_clk_domains)(struct gk20a *g); diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 3c3ad0fb..c87414d0 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -832,6 +832,7 @@ int gp106_init_hal(struct gk20a *g) g->pmu_lsf_pmu_wpr_init_done = 0; g->bootstrap_owner = LSF_FALCON_ID_SEC2; + gops->clk.split_rail_support = true; g->name = "gp10x"; diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index e1c44dd5..f0926402 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c @@ -907,6 +907,7 @@ int gv100_init_hal(struct gk20a *g) g->pmu_lsf_pmu_wpr_init_done = 0; g->bootstrap_owner = LSF_FALCON_ID_SEC2; + gops->clk.split_rail_support = false; g->name = "gv10x"; -- cgit v1.2.2