From 1389aa3e87ae059121329af41009b37692177775 Mon Sep 17 00:00:00 2001 From: Mahantesh Kumbar Date: Mon, 12 Mar 2018 15:09:03 +0530 Subject: gpu: nvgpu: gv100 temperature read support - Enabled internal temperature sensor read for gv100 dgpu. - Added check to temperature read support before proceeding to read temperature from H/W - Assigned GP106 temperature HAL's for GV100 as no changes between GP106 & GV100 H/W registers. Bug 200352328 Change-Id: I86b5a1859b87ace49a07d0ff3749bb5b085bba91 Signed-off-by: Mahantesh Kumbar Reviewed-on: https://git-master.nvidia.com/r/1673347 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv100/hal_gv100.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/gpu/nvgpu/gv100/hal_gv100.c') 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) return err; __nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); + __nvgpu_set_enabled(g, NVGPU_SUPPORT_GET_TEMPERATURE, true); return 0; } @@ -587,6 +588,14 @@ static const struct gpu_ops gv100_ops = { .exit = gk20a_pramin_exit, .data032_r = pram_data032_r, }, + .therm = { +#ifdef CONFIG_DEBUG_FS + .therm_debugfs_init = gp106_therm_debugfs_init, +#endif /* CONFIG_DEBUG_FS */ + .elcg_init_idle_filters = gp106_elcg_init_idle_filters, + .get_internal_sensor_curr_temp = + gp106_get_internal_sensor_curr_temp, + }, .pmu = { .init_wpr_region = gv100_pmu_init_acr, .load_lsfalcon_ucode = gv100_load_falcon_ucode, -- cgit v1.2.2