diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-10-11 17:58:57 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-26 17:35:38 -0400 |
commit | e49d93a960f8995affeb4541941eb7f16d04eafd (patch) | |
tree | 7b5eb1365bfee8a237ddf7d8e0b02959e50f5704 /drivers/gpu/nvgpu/gp106 | |
parent | 9eebb7831facaa16b2975f50a716d2986c67b699 (diff) |
gpu: nvgpu: Linux specific GPU characteristics flags
Make GPU characteristics flags specific to Linux code only. The
rest of driver is moved to using nvgpu_is_enabled() API.
JIRA NVGPU-259
Change-Id: I2faf46ef64c964361c267887b28c9d19806d6d51
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1583876
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 1e81796e..c5b62948 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -189,26 +189,24 @@ static int gp106_get_litter_value(struct gk20a *g, int value) | |||
189 | 189 | ||
190 | static int gp106_init_gpu_characteristics(struct gk20a *g) | 190 | static int gp106_init_gpu_characteristics(struct gk20a *g) |
191 | { | 191 | { |
192 | struct nvgpu_gpu_characteristics *gpu = &g->gpu_characteristics; | ||
193 | |||
194 | int err; | 192 | int err; |
195 | 193 | ||
196 | err = gk20a_init_gpu_characteristics(g); | 194 | err = gk20a_init_gpu_characteristics(g); |
197 | if (err) | 195 | if (err) |
198 | return err; | 196 | return err; |
199 | 197 | ||
200 | gpu->flags |= NVGPU_GPU_FLAGS_SUPPORT_GET_VOLTAGE | | 198 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_GET_VOLTAGE, true); |
201 | NVGPU_GPU_FLAGS_SUPPORT_GET_CURRENT | | 199 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_GET_CURRENT, true); |
202 | NVGPU_GPU_FLAGS_SUPPORT_GET_POWER | | 200 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_GET_POWER, true); |
203 | NVGPU_GPU_FLAGS_SUPPORT_GET_TEMPERATURE | | 201 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_GET_TEMPERATURE, true); |
204 | NVGPU_GPU_FLAGS_SUPPORT_DEVICE_EVENTS | | 202 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_DEVICE_EVENTS, true); |
205 | NVGPU_GPU_FLAGS_SUPPORT_SET_THERM_ALERT_LIMIT; | 203 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_SET_THERM_ALERT_LIMIT, true); |
206 | 204 | ||
207 | /* WAR for missing INA3221 on HW2.5 RevA */ | 205 | /* WAR for missing INA3221 on HW2.5 RevA */ |
208 | if (g->power_sensor_missing) { | 206 | if (g->power_sensor_missing) { |
209 | gpu->flags &= ~(NVGPU_GPU_FLAGS_SUPPORT_GET_VOLTAGE | | 207 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_GET_VOLTAGE, false); |
210 | NVGPU_GPU_FLAGS_SUPPORT_GET_CURRENT | | 208 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_GET_CURRENT, false); |
211 | NVGPU_GPU_FLAGS_SUPPORT_GET_POWER); | 209 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_GET_POWER, false); |
212 | } | 210 | } |
213 | 211 | ||
214 | return 0; | 212 | return 0; |