From fa6cf4598eddaeffa6d684c0c121546e41ecdd48 Mon Sep 17 00:00:00 2001 From: Antony Clince Alex Date: Mon, 23 Mar 2020 19:12:19 +0530 Subject: [PATCH] nvgpu: userspace: update therm unit init Update therm unit testcase: test_setup_env to include assignment of hal function: therm_max_fpdiv_factor. Jira: NVGPU-4860 Change-Id: I644191cdd4d4538d0c189af9cb80cea3d6368820 Signed-off-by: Antony Clince Alex Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2317074 Tested-by: mobile promotions Reviewed-by: automaticguardword Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: Lakshmanan M Reviewed-by: Alex Waterman Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/libnvgpu-drv_safe.export | 1 + userspace/units/therm/nvgpu-therm.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/nvgpu/libnvgpu-drv_safe.export b/drivers/gpu/nvgpu/libnvgpu-drv_safe.export index f7d31c272..aa91e07b5 100644 --- a/drivers/gpu/nvgpu/libnvgpu-drv_safe.export +++ b/drivers/gpu/nvgpu/libnvgpu-drv_safe.export @@ -162,6 +162,7 @@ gv11b_gpu_phys_addr gv11b_init_fifo_reset_enable_hw gv11b_init_fifo_setup_hw gv11b_init_hal +gv11b_therm_max_fpdiv_factor gv11b_init_therm_setup_hw gv11b_is_fault_engine_subid_gpc gv11b_mc_is_mmu_fault_pending diff --git a/userspace/units/therm/nvgpu-therm.c b/userspace/units/therm/nvgpu-therm.c index 7b29c2de3..5d7d73b65 100644 --- a/userspace/units/therm/nvgpu-therm.c +++ b/userspace/units/therm/nvgpu-therm.c @@ -87,6 +87,8 @@ int test_setup_env(struct unit_module *m, (void)nvgpu_posix_register_io(g, &test_reg_callbacks); /* setup HALs */ + + g->ops.therm.therm_max_fpdiv_factor = gv11b_therm_max_fpdiv_factor; g->ops.therm.init_therm_support = nvgpu_init_therm_support; g->ops.therm.init_therm_setup_hw = gv11b_init_therm_setup_hw; g->ops.therm.init_elcg_mode = gv11b_therm_init_elcg_mode;