mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: remove linux dependent from pmu_gk20a.c
- Removed Linux dependent header - Moved thermal alarm post from pmu_gk20a.c to clk_arb.c - Implemented nvgpu_clk_arb_send_thermal_alaram() method to post NVGPU_GPU_EVENT_ALARM_THERMAL_ABOVE_THRESHOLD JIRA NVGPU-403 Change-Id: Ibf85c2f3a6e704fdcc0502745fab820f7ea428f4 Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1608313 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d73ad6c07d
commit
5e9f4bbf8d
@@ -423,6 +423,12 @@ mutex_fail:
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void nvgpu_clk_arb_send_thermal_alarm(struct gk20a *g)
|
||||||
|
{
|
||||||
|
nvgpu_clk_arb_schedule_alarm(g,
|
||||||
|
(0x1UL << NVGPU_GPU_EVENT_ALARM_THERMAL_ABOVE_THRESHOLD));
|
||||||
|
}
|
||||||
|
|
||||||
void nvgpu_clk_arb_schedule_alarm(struct gk20a *g, u32 alarm)
|
void nvgpu_clk_arb_schedule_alarm(struct gk20a *g, u32 alarm)
|
||||||
{
|
{
|
||||||
struct nvgpu_clk_arb *arb = g->clk_arb;
|
struct nvgpu_clk_arb *arb = g->clk_arb;
|
||||||
|
|||||||
@@ -22,8 +22,6 @@
|
|||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <uapi/linux/nvgpu.h>
|
|
||||||
|
|
||||||
#include <nvgpu/nvgpu_common.h>
|
#include <nvgpu/nvgpu_common.h>
|
||||||
#include <nvgpu/timers.h>
|
#include <nvgpu/timers.h>
|
||||||
#include <nvgpu/kmem.h>
|
#include <nvgpu/kmem.h>
|
||||||
@@ -590,8 +588,7 @@ int nvgpu_pmu_handle_therm_event(struct nvgpu_pmu *pmu,
|
|||||||
switch (msg->msg_type) {
|
switch (msg->msg_type) {
|
||||||
case NV_PMU_THERM_MSG_ID_EVENT_HW_SLOWDOWN_NOTIFICATION:
|
case NV_PMU_THERM_MSG_ID_EVENT_HW_SLOWDOWN_NOTIFICATION:
|
||||||
if (msg->hw_slct_msg.mask == BIT(NV_PMU_THERM_EVENT_THERMAL_1))
|
if (msg->hw_slct_msg.mask == BIT(NV_PMU_THERM_EVENT_THERMAL_1))
|
||||||
nvgpu_clk_arb_schedule_alarm(gk20a_from_pmu(pmu),
|
nvgpu_clk_arb_send_thermal_alarm(pmu->g);
|
||||||
(0x1UL << NVGPU_GPU_EVENT_ALARM_THERMAL_ABOVE_THRESHOLD));
|
|
||||||
else
|
else
|
||||||
gk20a_dbg_pmu("Unwanted/Unregistered thermal event received %d",
|
gk20a_dbg_pmu("Unwanted/Unregistered thermal event received %d",
|
||||||
msg->hw_slct_msg.mask);
|
msg->hw_slct_msg.mask);
|
||||||
|
|||||||
@@ -77,6 +77,8 @@ int nvgpu_clk_arb_get_current_pstate(struct gk20a *g);
|
|||||||
|
|
||||||
void nvgpu_clk_arb_pstate_change_lock(struct gk20a *g, bool lock);
|
void nvgpu_clk_arb_pstate_change_lock(struct gk20a *g, bool lock);
|
||||||
|
|
||||||
|
void nvgpu_clk_arb_send_thermal_alarm(struct gk20a *g);
|
||||||
|
|
||||||
void nvgpu_clk_arb_schedule_alarm(struct gk20a *g, u32 alarm);
|
void nvgpu_clk_arb_schedule_alarm(struct gk20a *g, u32 alarm);
|
||||||
#endif /* __NVGPU_CLK_ARB_H__ */
|
#endif /* __NVGPU_CLK_ARB_H__ */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user