From 8d712cd23596ec53e519ac531348f5ee93fc7717 Mon Sep 17 00:00:00 2001 From: Lakshmanan M Date: Fri, 11 Nov 2016 13:50:46 +0530 Subject: gpu: nvgpu: Add thermal alarm notification for UMD Added the thermal alarm notification handling for UMD JIRA DNVGPU-130 Bug 200231080 Change-Id: I034c7b35a18a091ef7659ff992f1950576623cad Signed-off-by: Lakshmanan M Reviewed-on: http://git-master/r/1251760 (cherry picked from commit 9e66f2e2f7fbcab29e25c976c1d5fa29671afcd0) Reviewed-on: http://git-master/r/1282084 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/pmu_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index e140b47a..4654491f 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c @@ -4036,8 +4036,14 @@ static int pmu_handle_therm_event(struct pmu_gk20a *pmu, switch (msg->msg_type) { case NV_PMU_THERM_MSG_ID_EVENT_HW_SLOWDOWN_NOTIFICATION: - gk20a_dbg_pmu("received asserted event mask %d", - msg->hw_slct_msg.mask); +#ifdef CONFIG_ARCH_TEGRA_18x_SOC + if (msg->hw_slct_msg.mask == BIT(NV_PMU_THERM_EVENT_THERMAL_1)) + nvgpu_clk_arb_schedule_alarm(gk20a_from_pmu(pmu), + (0x1UL << NVGPU_GPU_EVENT_ALARM_THERMAL_ABOVE_THRESHOLD)); + else +#endif + gk20a_dbg_pmu("Unwanted/Unregistered thermal event received %d", + msg->hw_slct_msg.mask); break; default: gk20a_dbg_pmu("unkown therm event received %d", msg->msg_type); -- cgit v1.2.2