mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Re-structure nvgpu_pmu struct
- Make a new structure: nvgpu_pmu_pg for PG unit - This new struct combines all PG unit variables like elpg_stat, elpg_refcnt, pg_init etc. into one structure as a part of PG unit refactoring. - Use pmu_pg struct to access all PG variables. - Eg: &pmu->pmu_pg.elpg_mutex, &pmu->pmu_pg.pg_mutex and so on. NVGPU-1973 Change-Id: I9973072826f4089f6315827bce49fa30dbcbcdda Signed-off-by: Divya Singhatwaria <dsinghatwari@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2071306 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
696d212718
commit
43d6dc82c9
@@ -579,7 +579,7 @@ static ssize_t aelpg_param_store(struct device *dev,
|
||||
struct gk20a *g = get_gk20a(dev);
|
||||
int status = 0;
|
||||
union pmu_ap_cmd ap_cmd;
|
||||
int *paramlist = (int *)g->pmu.aelpg_param;
|
||||
int *paramlist = (int *)g->pmu.pmu_pg.aelpg_param;
|
||||
u32 defaultparam[5] = {
|
||||
APCTRL_SAMPLING_PERIOD_PG_DEFAULT_US,
|
||||
APCTRL_MINIMUM_IDLE_FILTER_DEFAULT_US,
|
||||
@@ -622,9 +622,9 @@ static ssize_t aelpg_param_read(struct device *dev,
|
||||
struct gk20a *g = get_gk20a(dev);
|
||||
|
||||
return snprintf(buf, PAGE_SIZE,
|
||||
"%d %d %d %d %d\n", g->pmu.aelpg_param[0],
|
||||
g->pmu.aelpg_param[1], g->pmu.aelpg_param[2],
|
||||
g->pmu.aelpg_param[3], g->pmu.aelpg_param[4]);
|
||||
"%d %d %d %d %d\n", g->pmu.pmu_pg.aelpg_param[0],
|
||||
g->pmu.pmu_pg.aelpg_param[1], g->pmu.pmu_pg.aelpg_param[2],
|
||||
g->pmu.pmu_pg.aelpg_param[3], g->pmu.pmu_pg.aelpg_param[4]);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR(aelpg_param, ROOTRW,
|
||||
|
||||
Reference in New Issue
Block a user