diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/clk_arb.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/clk_arb.h | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/clk_arb.c b/drivers/gpu/nvgpu/common/linux/clk_arb.c index 95042389..82c97891 100644 --- a/drivers/gpu/nvgpu/common/linux/clk_arb.c +++ b/drivers/gpu/nvgpu/common/linux/clk_arb.c | |||
@@ -423,6 +423,12 @@ mutex_fail: | |||
423 | return err; | 423 | return err; |
424 | } | 424 | } |
425 | 425 | ||
426 | void nvgpu_clk_arb_send_thermal_alarm(struct gk20a *g) | ||
427 | { | ||
428 | nvgpu_clk_arb_schedule_alarm(g, | ||
429 | (0x1UL << NVGPU_GPU_EVENT_ALARM_THERMAL_ABOVE_THRESHOLD)); | ||
430 | } | ||
431 | |||
426 | void nvgpu_clk_arb_schedule_alarm(struct gk20a *g, u32 alarm) | 432 | void nvgpu_clk_arb_schedule_alarm(struct gk20a *g, u32 alarm) |
427 | { | 433 | { |
428 | struct nvgpu_clk_arb *arb = g->clk_arb; | 434 | struct nvgpu_clk_arb *arb = g->clk_arb; |
diff --git a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c index 4e3eeb51..f9f85219 100644 --- a/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/pmu_gk20a.c | |||
@@ -22,8 +22,6 @@ | |||
22 | * DEALINGS IN THE SOFTWARE. | 22 | * DEALINGS IN THE SOFTWARE. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <uapi/linux/nvgpu.h> | ||
26 | |||
27 | #include <nvgpu/nvgpu_common.h> | 25 | #include <nvgpu/nvgpu_common.h> |
28 | #include <nvgpu/timers.h> | 26 | #include <nvgpu/timers.h> |
29 | #include <nvgpu/kmem.h> | 27 | #include <nvgpu/kmem.h> |
@@ -590,8 +588,7 @@ int nvgpu_pmu_handle_therm_event(struct nvgpu_pmu *pmu, | |||
590 | switch (msg->msg_type) { | 588 | switch (msg->msg_type) { |
591 | case NV_PMU_THERM_MSG_ID_EVENT_HW_SLOWDOWN_NOTIFICATION: | 589 | case NV_PMU_THERM_MSG_ID_EVENT_HW_SLOWDOWN_NOTIFICATION: |
592 | if (msg->hw_slct_msg.mask == BIT(NV_PMU_THERM_EVENT_THERMAL_1)) | 590 | if (msg->hw_slct_msg.mask == BIT(NV_PMU_THERM_EVENT_THERMAL_1)) |
593 | nvgpu_clk_arb_schedule_alarm(gk20a_from_pmu(pmu), | 591 | nvgpu_clk_arb_send_thermal_alarm(pmu->g); |
594 | (0x1UL << NVGPU_GPU_EVENT_ALARM_THERMAL_ABOVE_THRESHOLD)); | ||
595 | else | 592 | else |
596 | gk20a_dbg_pmu("Unwanted/Unregistered thermal event received %d", | 593 | gk20a_dbg_pmu("Unwanted/Unregistered thermal event received %d", |
597 | msg->hw_slct_msg.mask); | 594 | msg->hw_slct_msg.mask); |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h b/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h index 09f0b0d3..c13144ee 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h +++ b/drivers/gpu/nvgpu/include/nvgpu/clk_arb.h | |||
@@ -77,6 +77,8 @@ int nvgpu_clk_arb_get_current_pstate(struct gk20a *g); | |||
77 | 77 | ||
78 | void nvgpu_clk_arb_pstate_change_lock(struct gk20a *g, bool lock); | 78 | void nvgpu_clk_arb_pstate_change_lock(struct gk20a *g, bool lock); |
79 | 79 | ||
80 | void nvgpu_clk_arb_send_thermal_alarm(struct gk20a *g); | ||
81 | |||
80 | void nvgpu_clk_arb_schedule_alarm(struct gk20a *g, u32 alarm); | 82 | void nvgpu_clk_arb_schedule_alarm(struct gk20a *g, u32 alarm); |
81 | #endif /* __NVGPU_CLK_ARB_H__ */ | 83 | #endif /* __NVGPU_CLK_ARB_H__ */ |
82 | 84 | ||