diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c index 351be55e..e2a97caa 100644 --- a/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ctrl_gk20a.c | |||
@@ -987,10 +987,7 @@ static int nvgpu_gpu_clk_get_range(struct gk20a *g, | |||
987 | return -EFAULT; | 987 | return -EFAULT; |
988 | } else { | 988 | } else { |
989 | bit = ffs(clk_domains) - 1; | 989 | bit = ffs(clk_domains) - 1; |
990 | if (bit <= NVGPU_GPU_CLK_DOMAIN_GPCCLK) | 990 | clk_range.clk_domain = bit; |
991 | clk_range.clk_domain = bit; | ||
992 | else | ||
993 | clk_range.clk_domain = BIT(bit); | ||
994 | clk_domains &= ~BIT(bit); | 991 | clk_domains &= ~BIT(bit); |
995 | } | 992 | } |
996 | 993 | ||
@@ -1139,10 +1136,7 @@ static int nvgpu_gpu_clk_get_info(struct gk20a *g, | |||
1139 | return -EFAULT; | 1136 | return -EFAULT; |
1140 | } else { | 1137 | } else { |
1141 | bit = ffs(clk_domains) - 1; | 1138 | bit = ffs(clk_domains) - 1; |
1142 | if (bit <= NVGPU_GPU_CLK_DOMAIN_GPCCLK) | 1139 | clk_info.clk_domain = bit; |
1143 | clk_info.clk_domain = bit; | ||
1144 | else | ||
1145 | clk_info.clk_domain = BIT(bit); | ||
1146 | clk_domains &= ~BIT(bit); | 1140 | clk_domains &= ~BIT(bit); |
1147 | clk_info.clk_type = args->clk_type; | 1141 | clk_info.clk_type = args->clk_type; |
1148 | } | 1142 | } |