diff options
author | ddutta <ddutta@nvidia.com> | 2020-02-26 05:37:29 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2020-02-28 10:42:46 -0500 |
commit | fbad02d5e045fbc10f44fbecf419235938d4d0bc (patch) | |
tree | 3baba48815e50221ca096ec5e7275266cbe1f717 /drivers/gpu | |
parent | aaecfae53f60715e52a9e29a956d0246f4f0bafa (diff) |
gpu: nvgpu: remove blcg_enable/disable
blcg is always enabled by default and there is no need for disabling
this during gr init or gr reset.
Bug 2866010
Change-Id: Iaf17b7fdf05ad04fe435e1a1fda758deedc6484c
Signed-off-by: ddutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2303114
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/pmu/pmu.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/power_features/cg/cg.c | 28 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/power_features/cg.h | 2 |
4 files changed, 0 insertions, 36 deletions
diff --git a/drivers/gpu/nvgpu/common/pmu/pmu.c b/drivers/gpu/nvgpu/common/pmu/pmu.c index 59d38277..413db0a6 100644 --- a/drivers/gpu/nvgpu/common/pmu/pmu.c +++ b/drivers/gpu/nvgpu/common/pmu/pmu.c | |||
@@ -529,8 +529,6 @@ static int nvgpu_pg_init_task(void *arg) | |||
529 | 529 | ||
530 | gk20a_gr_wait_initialized(g); | 530 | gk20a_gr_wait_initialized(g); |
531 | 531 | ||
532 | nvgpu_cg_blcg_enable_no_wait(g); | ||
533 | |||
534 | nvgpu_cg_elcg_enable_no_wait(g); | 532 | nvgpu_cg_elcg_enable_no_wait(g); |
535 | 533 | ||
536 | return 0; | 534 | return 0; |
diff --git a/drivers/gpu/nvgpu/common/power_features/cg/cg.c b/drivers/gpu/nvgpu/common/power_features/cg/cg.c index a966c4c6..7b66a81d 100644 --- a/drivers/gpu/nvgpu/common/power_features/cg/cg.c +++ b/drivers/gpu/nvgpu/common/power_features/cg/cg.c | |||
@@ -84,34 +84,6 @@ void nvgpu_cg_elcg_disable_no_wait(struct gk20a *g) | |||
84 | nvgpu_mutex_release(&g->cg_pg_lock); | 84 | nvgpu_mutex_release(&g->cg_pg_lock); |
85 | } | 85 | } |
86 | 86 | ||
87 | void nvgpu_cg_blcg_disable_no_wait(struct gk20a *g) { | ||
88 | nvgpu_log_fn(g, " "); | ||
89 | |||
90 | if (!nvgpu_is_enabled(g, NVGPU_GPU_CAN_BLCG)) { | ||
91 | return; | ||
92 | } | ||
93 | |||
94 | nvgpu_mutex_acquire(&g->cg_pg_lock); | ||
95 | if (g->blcg_enabled) { | ||
96 | nvgpu_cg_set_mode(g, BLCG_MODE, BLCG_RUN); | ||
97 | } | ||
98 | nvgpu_mutex_release(&g->cg_pg_lock); | ||
99 | } | ||
100 | |||
101 | void nvgpu_cg_blcg_enable_no_wait(struct gk20a *g) { | ||
102 | nvgpu_log_fn(g, " "); | ||
103 | |||
104 | if (!nvgpu_is_enabled(g, NVGPU_GPU_CAN_BLCG)) { | ||
105 | return; | ||
106 | } | ||
107 | |||
108 | nvgpu_mutex_acquire(&g->cg_pg_lock); | ||
109 | if (g->blcg_enabled) { | ||
110 | nvgpu_cg_set_mode(g, BLCG_MODE, BLCG_AUTO); | ||
111 | } | ||
112 | nvgpu_mutex_release(&g->cg_pg_lock); | ||
113 | } | ||
114 | |||
115 | void nvgpu_cg_elcg_enable(struct gk20a *g) | 87 | void nvgpu_cg_elcg_enable(struct gk20a *g) |
116 | { | 88 | { |
117 | nvgpu_log_fn(g, " "); | 89 | nvgpu_log_fn(g, " "); |
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index d24b8bf7..989ee5c9 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -4694,9 +4694,6 @@ static int gk20a_init_gr_prepare(struct gk20a *g) | |||
4694 | /* Disable elcg until it gets enabled later in the init*/ | 4694 | /* Disable elcg until it gets enabled later in the init*/ |
4695 | nvgpu_cg_elcg_disable_no_wait(g); | 4695 | nvgpu_cg_elcg_disable_no_wait(g); |
4696 | 4696 | ||
4697 | /* Disable blcg until it gets enabled later in the init*/ | ||
4698 | nvgpu_cg_blcg_disable_no_wait(g); | ||
4699 | |||
4700 | /* enable fifo access */ | 4697 | /* enable fifo access */ |
4701 | gk20a_writel(g, gr_gpfifo_ctl_r(), | 4698 | gk20a_writel(g, gr_gpfifo_ctl_r(), |
4702 | gr_gpfifo_ctl_access_enabled_f() | | 4699 | gr_gpfifo_ctl_access_enabled_f() | |
@@ -5163,7 +5160,6 @@ int gk20a_gr_reset(struct gk20a *g) | |||
5163 | 5160 | ||
5164 | nvgpu_cg_init_gr_load_gating_prod(g); | 5161 | nvgpu_cg_init_gr_load_gating_prod(g); |
5165 | nvgpu_cg_elcg_enable_no_wait(g); | 5162 | nvgpu_cg_elcg_enable_no_wait(g); |
5166 | nvgpu_cg_blcg_enable_no_wait(g); | ||
5167 | 5163 | ||
5168 | /* GR is inialized, signal possible waiters */ | 5164 | /* GR is inialized, signal possible waiters */ |
5169 | g->gr.initialized = true; | 5165 | g->gr.initialized = true; |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/power_features/cg.h b/drivers/gpu/nvgpu/include/nvgpu/power_features/cg.h index e2395176..d447d9b4 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/power_features/cg.h +++ b/drivers/gpu/nvgpu/include/nvgpu/power_features/cg.h | |||
@@ -35,8 +35,6 @@ void nvgpu_cg_elcg_disable(struct gk20a *g); | |||
35 | void nvgpu_cg_elcg_enable_no_wait(struct gk20a *g); | 35 | void nvgpu_cg_elcg_enable_no_wait(struct gk20a *g); |
36 | void nvgpu_cg_elcg_disable_no_wait(struct gk20a *g); | 36 | void nvgpu_cg_elcg_disable_no_wait(struct gk20a *g); |
37 | void nvgpu_cg_elcg_set_elcg_enabled(struct gk20a *g, bool enable); | 37 | void nvgpu_cg_elcg_set_elcg_enabled(struct gk20a *g, bool enable); |
38 | void nvgpu_cg_blcg_disable_no_wait(struct gk20a *g); | ||
39 | void nvgpu_cg_blcg_enable_no_wait(struct gk20a *g); | ||
40 | 38 | ||
41 | void nvgpu_cg_blcg_mode_enable(struct gk20a *g); | 39 | void nvgpu_cg_blcg_mode_enable(struct gk20a *g); |
42 | void nvgpu_cg_blcg_mode_disable(struct gk20a *g); | 40 | void nvgpu_cg_blcg_mode_disable(struct gk20a *g); |