gpu: nvgpu: Restructure common.pmu.therm unit

This patch does the following.
1. Remove include of HW header files in common.
2. Append public functions with nvgpu.

Jira NVGPU-1959

Change-Id: Ibd60620e9db14b52d49577b899b2d2077b5a544a
Signed-off-by: Abdul Salam <absalam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2019236
Reviewed-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-misra-checker <svc-misra-checker@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:
Abdul Salam
2019-02-20 12:23:40 +05:30
committed by mobile promotions
parent a433f26d5b
commit c7702ab5ff
7 changed files with 18 additions and 20 deletions

View File

@@ -37,7 +37,7 @@ static int pstate_sw_setup(struct gk20a *g);
void gk20a_deinit_pstate_support(struct gk20a *g)
{
pmgr_pmu_free_pmupstate(g);
therm_pmu_free_pmupstate(g);
nvgpu_therm_pmu_free_pmupstate(g);
perf_pmu_free_pmupstate(g);
nvgpu_clk_free_pmupstate(g);
@@ -69,7 +69,7 @@ int gk20a_init_pstate_support(struct gk20a *g)
goto err_clk_init_pmupstate;
}
err = therm_pmu_init_pmupstate(g);
err = nvgpu_therm_pmu_init_pmupstate(g);
if (err != 0) {
goto err_perf_pmu_init_pmupstate;
}
@@ -104,7 +104,7 @@ int gk20a_init_pstate_support(struct gk20a *g)
goto err_pmgr_pmu_init_pmupstate;
}
err = therm_domain_sw_setup(g);
err = nvgpu_therm_domain_sw_setup(g);
if (err != 0) {
goto err_pmgr_pmu_init_pmupstate;
}
@@ -184,7 +184,7 @@ int gk20a_init_pstate_support(struct gk20a *g)
err_pmgr_pmu_init_pmupstate:
pmgr_pmu_free_pmupstate(g);
err_therm_pmu_init_pmupstate:
therm_pmu_free_pmupstate(g);
nvgpu_therm_pmu_free_pmupstate(g);
err_perf_pmu_init_pmupstate:
perf_pmu_free_pmupstate(g);
err_clk_init_pmupstate:
@@ -231,7 +231,7 @@ int gk20a_init_pstate_pmu_support(struct gk20a *g)
return err;
}
err = therm_domain_pmu_setup(g);
err = nvgpu_therm_domain_pmu_setup(g);
if (err != 0) {
return err;
}

View File

@@ -26,7 +26,7 @@
#include "thrm.h"
#include "thrmpmu.h"
int therm_domain_sw_setup(struct gk20a *g)
int nvgpu_therm_domain_sw_setup(struct gk20a *g)
{
int status;
@@ -50,12 +50,12 @@ exit:
return status;
}
int therm_domain_pmu_setup(struct gk20a *g)
int nvgpu_therm_domain_pmu_setup(struct gk20a *g)
{
return therm_send_pmgr_tables_to_pmu(g);
}
int therm_pmu_init_pmupstate(struct gk20a *g)
int nvgpu_therm_pmu_init_pmupstate(struct gk20a *g)
{
/* If already allocated, do not re-allocate */
if (g->therm_pmu != NULL) {
@@ -70,7 +70,7 @@ int therm_pmu_init_pmupstate(struct gk20a *g)
return 0;
}
void therm_pmu_free_pmupstate(struct gk20a *g)
void nvgpu_therm_pmu_free_pmupstate(struct gk20a *g)
{
nvgpu_kfree(g, g->therm_pmu);
g->therm_pmu = NULL;

View File

@@ -29,7 +29,6 @@
#include "thrmchannel.h"
#include "thrm.h"
#include "gp106/bios_gp106.h"
static int _therm_channel_pmudatainit_device(struct gk20a *g,
struct boardobj *board_obj_ptr,

View File

@@ -30,7 +30,6 @@
#include "thrmdev.h"
#include "thrm.h"
#include "gp106/bios_gp106.h"
static int _therm_device_pmudata_instget(struct gk20a *g,
struct nv_pmu_boardobjgrp *pmuboardobjgrp,

View File

@@ -23,10 +23,10 @@
#include <nvgpu/boardobjgrp.h>
#include <nvgpu/boardobjgrp_e32.h>
#include <nvgpu/pmu/therm.h>
#include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h>
#include "thrmpmu.h"
#include "thrm.h"
#include <nvgpu/pmuif/nvgpu_gpmu_cmdif.h>
struct therm_pmucmdhandler_params {
struct nv_pmu_therm_rpc *prpccall;
@@ -242,7 +242,7 @@ static int therm_send_slct_configuration_to_pmu(struct gk20a *g)
&seqdesc);
}
int therm_configure_therm_alert(struct gk20a *g)
int nvgpu_therm_configure_therm_alert(struct gk20a *g)
{
int status;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2016-2019, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -107,7 +107,7 @@ int gp106_configure_therm_alert(struct gk20a *g, s32 curr_warn_temp)
if (g->curr_warn_temp != curr_warn_temp) {
g->curr_warn_temp = curr_warn_temp;
err = therm_configure_therm_alert(g);
err = nvgpu_therm_configure_therm_alert(g);
}
return err;

View File

@@ -26,10 +26,10 @@
struct gk20a;
int therm_domain_sw_setup(struct gk20a *g);
int therm_domain_pmu_setup(struct gk20a *g);
int therm_pmu_init_pmupstate(struct gk20a *g);
void therm_pmu_free_pmupstate(struct gk20a *g);
int therm_configure_therm_alert(struct gk20a *g);
int nvgpu_therm_domain_sw_setup(struct gk20a *g);
int nvgpu_therm_domain_pmu_setup(struct gk20a *g);
int nvgpu_therm_pmu_init_pmupstate(struct gk20a *g);
void nvgpu_therm_pmu_free_pmupstate(struct gk20a *g);
int nvgpu_therm_configure_therm_alert(struct gk20a *g);
#endif /* NVGPU_PMU_THREM_H */