summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include
diff options
context:
space:
mode:
authorMahantesh Kumbar <mkumbar@nvidia.com>2018-03-16 14:03:23 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-08-28 09:46:36 -0400
commit3e5e4804f9c2bf5b914012852b56dbbbc00f8253 (patch)
tree748dcdbd358e82cf9fe9b53c078dc64c910b97da /drivers/gpu/nvgpu/include
parent271456272d09d6c21728cc92bedc8ec6f7f48c8b (diff)
gpu: nvgpu: gv10x therm boardobj support
- Added support for below multiple therm sensor device & defined macros GPC_TSOSC GPC SCI HBM2_SITE HBM2_COMBINED - Added PMU interface for listed therm sensor device - Added nvgpu interface for listed therm sensor device - Added construct boardobj support for listed therm sensor device & called to update nvgpu interface. - Updated devinit_get_therm_device_table() to read sensor info from therm device table from vbios table & construct respective therm device boardobj using construct_therm_device_*() based on class_id param read from vbios table. - Updated RPC handler to handle THERM ack request - Updated gv100 therm ops "get_internal_sensor_limits" to point to gp106_get_internal_sensor_limits() Change-Id: I4b4ed501d0625cb8fc7b300c820622e40ae59fe6 Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1676785 Reviewed-by: svc-misra-checker <svc-misra-checker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vaikundanathan S <vaikuns@nvidia.com> Tested-by: Vaikundanathan S <vaikuns@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/bios.h7
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h22
2 files changed, 28 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/bios.h b/drivers/gpu/nvgpu/include/nvgpu/bios.h
index 0619fcb9..0323dce4 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/bios.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/bios.h
@@ -890,7 +890,12 @@ struct therm_device_1x_entry {
890 u8 flags; 890 u8 flags;
891} ; 891} ;
892 892
893#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_GPU 0x01 893#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_INVALID 0x00
894#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_GPU 0x01
895#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_GPU_GPC_TSOSC 0x02
896#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_GPU_GPC_SCI 0x03
897#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_HBM2_SITE 0x70
898#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_CLASS_HBM2_COMBINED 0x71
894 899
895#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_PARAM0_I2C_DEVICE_INDEX_MASK 0xFF 900#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_PARAM0_I2C_DEVICE_INDEX_MASK 0xFF
896#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_PARAM0_I2C_DEVICE_INDEX_SHIFT 0 901#define NV_VBIOS_THERM_DEVICE_1X_ENTRY_PARAM0_I2C_DEVICE_INDEX_SHIFT 0
diff --git a/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h b/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h
index 994cd5b7..8f2a8584 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/pmuif/gpmuifthermsensor.h
@@ -41,15 +41,37 @@ struct nv_pmu_therm_therm_device_boardobj_set {
41 struct nv_pmu_boardobj super; 41 struct nv_pmu_boardobj super;
42}; 42};
43 43
44struct nv_pmu_therm_therm_device_gpu_gpc_tsosc_boardobj_set {
45 struct nv_pmu_therm_therm_device_boardobj_set super;
46 u8 gpc_tsosc_idx;
47};
48
49struct nv_pmu_therm_therm_device_gpu_sci_boardobj_set {
50 struct nv_pmu_therm_therm_device_boardobj_set super;
51};
52
44struct nv_pmu_therm_therm_device_i2c_boardobj_set { 53struct nv_pmu_therm_therm_device_i2c_boardobj_set {
45 struct nv_pmu_therm_therm_device_boardobj_set super; 54 struct nv_pmu_therm_therm_device_boardobj_set super;
46 u8 i2c_dev_idx; 55 u8 i2c_dev_idx;
47}; 56};
48 57
58struct nv_pmu_therm_therm_device_hbm2_site_boardobj_set {
59 struct nv_pmu_therm_therm_device_boardobj_set super;
60 u8 site_idx;
61};
62
63struct nv_pmu_therm_therm_device_hbm2_combined_boardobj_set {
64 struct nv_pmu_therm_therm_device_boardobj_set super;
65};
66
49union nv_pmu_therm_therm_device_boardobj_set_union { 67union nv_pmu_therm_therm_device_boardobj_set_union {
50 struct nv_pmu_boardobj board_obj; 68 struct nv_pmu_boardobj board_obj;
51 struct nv_pmu_therm_therm_device_boardobj_set therm_device; 69 struct nv_pmu_therm_therm_device_boardobj_set therm_device;
70 struct nv_pmu_therm_therm_device_gpu_gpc_tsosc_boardobj_set gpu_gpc_tsosc;
71 struct nv_pmu_therm_therm_device_gpu_sci_boardobj_set gpu_sci;
52 struct nv_pmu_therm_therm_device_i2c_boardobj_set i2c; 72 struct nv_pmu_therm_therm_device_i2c_boardobj_set i2c;
73 struct nv_pmu_therm_therm_device_hbm2_site_boardobj_set hbm2_site;
74 struct nv_pmu_therm_therm_device_hbm2_combined_boardobj_set hbm2_combined;
53}; 75};
54 76
55NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_device); 77NV_PMU_BOARDOBJ_GRP_SET_MAKE_E32(therm, therm_device);