diff options
author | Deepak Goyal <dgoyal@nvidia.com> | 2017-09-22 02:38:10 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-04 05:24:30 -0400 |
commit | 0e8aee1c1a38abbc2dccf3f604a9843cf38071e0 (patch) | |
tree | d7da679255e79a3c48041af1e78bc8d7374d47d2 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |
parent | edb116661348f1bc843849cdcc318fa47cf9724a (diff) |
gpu: nvgpu: skip clk gating prog for sim/emu.
For Simualtion/Emulation platforms,clock gating
should be skipped as it is not supported.
Added new flags "can_"X"lcg" to check platform
capability before doing SLCG,BLCG and ELCG.
Bug 200314250
Change-Id: I4124d444a77a4c06df8c1d82c6038bfd457f3db0
Signed-off-by: Deepak Goyal <dgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1566049
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 679b8492..628b6823 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -4067,6 +4067,9 @@ void gr_gk20a_init_blcg_mode(struct gk20a *g, u32 mode, u32 engine) | |||
4067 | { | 4067 | { |
4068 | u32 gate_ctrl; | 4068 | u32 gate_ctrl; |
4069 | 4069 | ||
4070 | if (!nvgpu_is_enabled(g, NVGPU_GPU_CAN_BLCG)) | ||
4071 | return; | ||
4072 | |||
4070 | gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(engine)); | 4073 | gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(engine)); |
4071 | 4074 | ||
4072 | switch (mode) { | 4075 | switch (mode) { |
@@ -4095,6 +4098,9 @@ void gr_gk20a_init_elcg_mode(struct gk20a *g, u32 mode, u32 engine) | |||
4095 | 4098 | ||
4096 | gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(engine)); | 4099 | gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(engine)); |
4097 | 4100 | ||
4101 | if (!nvgpu_is_enabled(g, NVGPU_GPU_CAN_ELCG)) | ||
4102 | return; | ||
4103 | |||
4098 | switch (mode) { | 4104 | switch (mode) { |
4099 | case ELCG_RUN: | 4105 | case ELCG_RUN: |
4100 | gate_ctrl = set_field(gate_ctrl, | 4106 | gate_ctrl = set_field(gate_ctrl, |