diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gv100/hal_gv100.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c index 12e3a297..c37f45dd 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_ctrl.c | |||
@@ -1376,6 +1376,9 @@ static int nvgpu_gpu_get_temperature(struct gk20a *g, | |||
1376 | if (args->reserved[0] || args->reserved[1] || args->reserved[2]) | 1376 | if (args->reserved[0] || args->reserved[1] || args->reserved[2]) |
1377 | return -EINVAL; | 1377 | return -EINVAL; |
1378 | 1378 | ||
1379 | if (!nvgpu_is_enabled(g, NVGPU_SUPPORT_GET_TEMPERATURE)) | ||
1380 | return -EINVAL; | ||
1381 | |||
1379 | if (!g->ops.therm.get_internal_sensor_curr_temp) | 1382 | if (!g->ops.therm.get_internal_sensor_curr_temp) |
1380 | return -EINVAL; | 1383 | return -EINVAL; |
1381 | 1384 | ||
diff --git a/drivers/gpu/nvgpu/gv100/hal_gv100.c b/drivers/gpu/nvgpu/gv100/hal_gv100.c index 1091cbd2..cf751135 100644 --- a/drivers/gpu/nvgpu/gv100/hal_gv100.c +++ b/drivers/gpu/nvgpu/gv100/hal_gv100.c | |||
@@ -246,6 +246,7 @@ int gv100_init_gpu_characteristics(struct gk20a *g) | |||
246 | return err; | 246 | return err; |
247 | 247 | ||
248 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); | 248 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); |
249 | __nvgpu_set_enabled(g, NVGPU_SUPPORT_GET_TEMPERATURE, true); | ||
249 | 250 | ||
250 | return 0; | 251 | return 0; |
251 | } | 252 | } |
@@ -587,6 +588,14 @@ static const struct gpu_ops gv100_ops = { | |||
587 | .exit = gk20a_pramin_exit, | 588 | .exit = gk20a_pramin_exit, |
588 | .data032_r = pram_data032_r, | 589 | .data032_r = pram_data032_r, |
589 | }, | 590 | }, |
591 | .therm = { | ||
592 | #ifdef CONFIG_DEBUG_FS | ||
593 | .therm_debugfs_init = gp106_therm_debugfs_init, | ||
594 | #endif /* CONFIG_DEBUG_FS */ | ||
595 | .elcg_init_idle_filters = gp106_elcg_init_idle_filters, | ||
596 | .get_internal_sensor_curr_temp = | ||
597 | gp106_get_internal_sensor_curr_temp, | ||
598 | }, | ||
590 | .pmu = { | 599 | .pmu = { |
591 | .init_wpr_region = gv100_pmu_init_acr, | 600 | .init_wpr_region = gv100_pmu_init_acr, |
592 | .load_lsfalcon_ucode = gv100_load_falcon_ucode, | 601 | .load_lsfalcon_ucode = gv100_load_falcon_ucode, |