summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
diff options
context:
space:
mode:
authorLakshmanan M <lm@nvidia.com>2016-11-07 05:19:00 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-01-10 06:54:56 -0500
commiteaeb5ff20f7663738cea2a415a7d923febf7ff85 (patch)
treefa81708fa3cbb8772fbce84a23bf4f71729acc33 /drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
parent21c83717b1826c854fe131528379b634a3c892c8 (diff)
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 <lm@nvidia.com> Reviewed-on: http://git-master/r/1248964 (cherry picked from commit 1850e5a9b9dfa2f9df634e2f284ab282ad9f7fc8) Reviewed-on: http://git-master/r/1253452 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/pmu_gk20a.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
index 56ebda1a..58dd6f43 100644
--- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c
@@ -4029,6 +4029,24 @@ static int pmu_handle_perfmon_event(struct pmu_gk20a *pmu,
4029} 4029}
4030 4030
4031 4031
4032static int pmu_handle_therm_event(struct pmu_gk20a *pmu,
4033 struct nv_pmu_therm_msg *msg)
4034{
4035 gk20a_dbg_fn("");
4036
4037 switch (msg->msg_type) {
4038 case NV_PMU_THERM_MSG_ID_EVENT_HW_SLOWDOWN_NOTIFICATION:
4039 gk20a_dbg_pmu("received asserted event mask %d",
4040 msg->hw_slct_msg.mask);
4041 break;
4042 default:
4043 gk20a_dbg_pmu("unkown therm event received %d", msg->msg_type);
4044 break;
4045 }
4046
4047 return 0;
4048}
4049
4032static int pmu_handle_event(struct pmu_gk20a *pmu, struct pmu_msg *msg) 4050static int pmu_handle_event(struct pmu_gk20a *pmu, struct pmu_msg *msg)
4033{ 4051{
4034 int err = 0; 4052 int err = 0;
@@ -4048,6 +4066,9 @@ static int pmu_handle_event(struct pmu_gk20a *pmu, struct pmu_msg *msg)
4048 WARN_ON(1); 4066 WARN_ON(1);
4049 } 4067 }
4050 break; 4068 break;
4069 case PMU_UNIT_THERM:
4070 err = pmu_handle_therm_event(pmu, &msg->msg.therm);
4071 break;
4051 default: 4072 default:
4052 break; 4073 break;
4053 } 4074 }