gpu: nvgpu: Remove cyclic dependency between arb & vf

Remove cyclic dependency between arb and vf point units.
Remove the header files and call the functions with funciton pointers.
Remove lpwr.h as they are not used.

Jira: NVGPU-1966

Change-Id: I64b1eb810fc343d8930857793f0d00a683cfd05d
Signed-off-by: Abdul Salam <absalam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2094043
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Abdul Salam
2019-04-10 12:24:02 +05:30
committed by mobile promotions
parent 3bb0f8ec0b
commit 364c780469
5 changed files with 7 additions and 4 deletions

View File

@@ -35,10 +35,8 @@
#include <nvgpu/gk20a.h>
#include <nvgpu/pmu/pstate.h>
#include <nvgpu/pmu/volt.h>
#include <nvgpu/pmu/lpwr.h>
#include <nvgpu/pmu/clk/clk.h>
#include <nvgpu/boardobjgrp_e255.h>
#include <nvgpu/pmu/clk/clk_vf_point.h>
int nvgpu_clk_notification_queue_alloc(struct gk20a *g,
struct nvgpu_clk_notification_queue *queue,
@@ -234,7 +232,7 @@ static void nvgpu_clk_arb_run_vf_table_cb(struct nvgpu_clk_arb *arb)
int err;
/* get latest vf curve from pmu */
err = nvgpu_clk_vf_point_cache(g);
err = g->clk_pmu->nvgpu_clk_vf_point_cache(g);
if (err != 0) {
nvgpu_err(g, "failed to cache VF table");
nvgpu_clk_arb_set_global_alarm(g,

View File

@@ -627,6 +627,8 @@ int nvgpu_clk_vf_point_init_pmupstate(struct gk20a *g)
return -ENOMEM;
}
g->clk_pmu->nvgpu_clk_vf_point_cache = nvgpu_clk_vf_point_cache;
return 0;
}

View File

@@ -181,6 +181,7 @@
#include <nvgpu/gr/gr.h>
#include <nvgpu/pmu/pmu_perfmon.h>
#include <nvgpu/gr/gr_intr.h>
#include <nvgpu/pmu/lpwr.h>
#include <nvgpu/hw/gv100/hw_proj_gv100.h>
#include <nvgpu/hw/gv100/hw_top_gv100.h>

View File

@@ -37,7 +37,6 @@ struct gk20a;
#include <nvgpu/cond.h>
#include <nvgpu/pmu/pstate.h>
#include <nvgpu/pmu/volt.h>
#include <nvgpu/pmu/lpwr.h>
#define MAX_F_POINTS 256
#define DEFAULT_EVENT_NUMBER 32U

View File

@@ -100,6 +100,9 @@ struct nvgpu_clk_pmupstate {
u8 (*get_fll_lut_vf_num_entries)(struct nvgpu_clk_pmupstate *pclk);
u32 (*get_fll_lut_min_volt)(struct nvgpu_clk_pmupstate *pclk);
u32 (*get_fll_lut_step_size)(struct nvgpu_clk_pmupstate *pclk);
/* clk_vf_point functions */
int (*nvgpu_clk_vf_point_cache)(struct gk20a *g);
};
void nvgpu_clkrpc_pmucmdhandler(struct gk20a *g, struct pmu_msg *msg,