summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorVaikundanathan S <vaikuns@nvidia.com>2018-04-25 03:05:55 -0400
committerTejal Kudav <tkudav@nvidia.com>2018-06-14 09:44:06 -0400
commit440cda8a6797a0c8c423a5e3357a458ed4dfad07 (patch)
tree61eaab047f81e09b6a9ad982e49c0c65e25a3396 /drivers
parent1b71581b9e3534661b4552faadf38bbb98851c45 (diff)
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 <vaikuns@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1702130 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_domain.c5
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h1
-rw-r--r--drivers/gpu/nvgpu/gp106/hal_gp106.c1
-rw-r--r--drivers/gpu/nvgpu/gv100/hal_gv100.c1
4 files changed, 7 insertions, 1 deletions
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,
131 pset->b_debug_mode = false; 131 pset->b_debug_mode = false;
132 pset->b_enforce_vf_monotonicity = pdomains->b_enforce_vf_monotonicity; 132 pset->b_enforce_vf_monotonicity = pdomains->b_enforce_vf_monotonicity;
133 pset->b_enforce_vf_smoothening = pdomains->b_enforce_vf_smoothening; 133 pset->b_enforce_vf_smoothening = pdomains->b_enforce_vf_smoothening;
134 pset->volt_rails_max = 2; 134 if (g->ops.clk.split_rail_support)
135 pset->volt_rails_max = 2;
136 else
137 pset->volt_rails_max = 1;
135 status = boardobjgrpmask_export( 138 status = boardobjgrpmask_export(
136 &pdomains->master_domains_mask.super, 139 &pdomains->master_domains_mask.super,
137 pdomains->master_domains_mask.super.bitcount, 140 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 {
1032 int (*mclk_init)(struct gk20a *g); 1032 int (*mclk_init)(struct gk20a *g);
1033 void (*mclk_deinit)(struct gk20a *g); 1033 void (*mclk_deinit)(struct gk20a *g);
1034 int (*mclk_change)(struct gk20a *g, u16 val); 1034 int (*mclk_change)(struct gk20a *g, u16 val);
1035 bool split_rail_support;
1035 } clk; 1036 } clk;
1036 struct { 1037 struct {
1037 u32 (*get_arbiter_clk_domains)(struct gk20a *g); 1038 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)
832 832
833 g->pmu_lsf_pmu_wpr_init_done = 0; 833 g->pmu_lsf_pmu_wpr_init_done = 0;
834 g->bootstrap_owner = LSF_FALCON_ID_SEC2; 834 g->bootstrap_owner = LSF_FALCON_ID_SEC2;
835 gops->clk.split_rail_support = true;
835 836
836 g->name = "gp10x"; 837 g->name = "gp10x";
837 838
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)
907 907
908 g->pmu_lsf_pmu_wpr_init_done = 0; 908 g->pmu_lsf_pmu_wpr_init_done = 0;
909 g->bootstrap_owner = LSF_FALCON_ID_SEC2; 909 g->bootstrap_owner = LSF_FALCON_ID_SEC2;
910 gops->clk.split_rail_support = false;
910 911
911 g->name = "gv10x"; 912 g->name = "gv10x";
912 913