gpu: nvgpu: perf: Refactor Perf unit

-Renamed and moved nvgpu_pmu_perf struct from public
to unit specific
-Renamed all functions as per public/private format

NVGPU-5029

Change-Id: If3f479bb1443850a5c8a8714cd1c9da346cb566a
Signed-off-by: rmylavarapu <rmylavarapu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2300609
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: automaticguardword <automaticguardword@nvidia.com>
Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
rmylavarapu
2020-02-21 15:28:47 +05:30
committed by Alex Waterman
parent 14f268563a
commit e424e4791a
18 changed files with 123 additions and 104 deletions

View File

@@ -37,7 +37,7 @@
#include "pstate.h"
#include "perf.h"
int nvgpu_get_pstate_entry_idx(struct gk20a *g, u32 num)
int perf_pstate_get_table_entry_idx(struct gk20a *g, u32 num)
{
struct pstates *pstates = &(g->pmu->perf_pmu->pstatesobjs);
struct pstate *pstate;
@@ -206,7 +206,7 @@ static int parse_pstate_entry_6x(struct gk20a *g,
pstate->pcie_idx = entry->pcie_idx;
for (clkidx = 0; clkidx < hdr->clock_entry_count; clkidx++) {
struct clk_set_info *pclksetinfo;
struct nvgpu_pmu_perf_pstate_clk_info *pclksetinfo;
struct vbios_pstate_entry_clock_6x *clk_entry;
domain = 0;
@@ -336,7 +336,7 @@ static int perf_pstate_pmudatainit(struct gk20a *g,
pset->numClkDomains = pprogs->num_clk_domains;
pset->boot_pstate_idx =
nvgpu_get_pstate_entry_idx(g, CTRL_PERF_PSTATE_P0);
perf_pstate_get_table_entry_idx(g, CTRL_PERF_PSTATE_P0);
done:
return status;
@@ -435,11 +435,11 @@ static struct pstate *perf_pstate_find(struct gk20a *g, u32 num)
return NULL;
}
struct clk_set_info *nvgpu_pmu_perf_pstate_get_clk_set_info(struct gk20a *g,
u32 pstate_num, u32 clkwhich)
struct nvgpu_pmu_perf_pstate_clk_info *nvgpu_pmu_perf_pstate_get_clk_set_info(
struct gk20a *g, u32 pstate_num, u32 clkwhich)
{
struct pstate *pstate = perf_pstate_find(g, pstate_num);
struct clk_set_info *info;
struct nvgpu_pmu_perf_pstate_clk_info *info;
u32 clkidx;
if (pstate == NULL) {