From eaeb5ff20f7663738cea2a415a7d923febf7ff85 Mon Sep 17 00:00:00 2001 From: Lakshmanan M Date: Mon, 7 Nov 2016 15:49:00 +0530 Subject: gpu: nvgpu: Add thermal alert event handling * Added the thermal alert event handling * Added the thermal alert event PMU RPC JIRA DNVGPU-130 Bug 200231080 Change-Id: If5ff2704e5aa6ad2f25123f72c3049a311dae5dc Signed-off-by: Lakshmanan M Reviewed-on: http://git-master/r/1248964 (cherry picked from commit 1850e5a9b9dfa2f9df634e2f284ab282ad9f7fc8) Reviewed-on: http://git-master/r/1253452 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/pmuif/gpmuiftherm.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'drivers/gpu/nvgpu/pmuif') diff --git a/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h b/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h index 9c10e93c..c87fe8a8 100644 --- a/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h +++ b/drivers/gpu/nvgpu/pmuif/gpmuiftherm.h @@ -18,8 +18,12 @@ #define NV_PMU_THERM_CMD_ID_RPC 0x00000002 #define NV_PMU_THERM_MSG_ID_RPC 0x00000002 +#define NV_PMU_THERM_RPC_ID_SLCT 0x00000000 #define NV_PMU_THERM_RPC_ID_SLCT_EVENT_TEMP_TH_SET 0x00000006 #define NV_PMU_THERM_EVENT_THERMAL_1 0x00000004 +#define NV_PMU_THERM_CMD_ID_HW_SLOWDOWN_NOTIFICATION 0x00000001 +#define NV_RM_PMU_THERM_HW_SLOWDOWN_NOTIFICATION_REQUEST_ENABLE 0x00000001 +#define NV_PMU_THERM_MSG_ID_EVENT_HW_SLOWDOWN_NOTIFICATION 0x00000001 struct nv_pmu_therm_rpc_slct_event_temp_th_set { s32 temp_threshold; @@ -27,10 +31,16 @@ struct nv_pmu_therm_rpc_slct_event_temp_th_set { flcn_status flcn_stat; }; +struct nv_pmu_therm_rpc_slct { + u32 mask_enabled; + flcn_status flcn_stat; +}; + struct nv_pmu_therm_rpc { u8 function; bool b_supported; union { + struct nv_pmu_therm_rpc_slct slct; struct nv_pmu_therm_rpc_slct_event_temp_th_set slct_event_temp_th_set; } params; }; @@ -41,6 +51,11 @@ struct nv_pmu_therm_cmd_rpc { struct nv_pmu_allocation request; }; +struct nv_pmu_therm_cmd_hw_slowdown_notification { + u8 cmd_type; + u8 request; +}; + #define NV_PMU_THERM_CMD_RPC_ALLOC_OFFSET \ offsetof(struct nv_pmu_therm_cmd_rpc, request) @@ -48,6 +63,7 @@ struct nv_pmu_therm_cmd { union { u8 cmd_type; struct nv_pmu_therm_cmd_rpc rpc; + struct nv_pmu_therm_cmd_hw_slowdown_notification hw_slct_notification; }; }; @@ -57,6 +73,11 @@ struct nv_pmu_therm_msg_rpc { struct nv_pmu_allocation response; }; +struct nv_pmu_therm_msg_event_hw_slowdown_notification { + u8 msg_type; + u32 mask; +}; + #define NV_PMU_THERM_MSG_RPC_ALLOC_OFFSET \ offsetof(struct nv_pmu_therm_msg_rpc, response) @@ -64,6 +85,7 @@ struct nv_pmu_therm_msg { union { u8 msg_type; struct nv_pmu_therm_msg_rpc rpc; + struct nv_pmu_therm_msg_event_hw_slowdown_notification hw_slct_msg; }; }; -- cgit v1.2.2