mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: Move can_elpg to struct gk20a
Copy can_elpg to struct gk20a at probe time, and access it from gk20a instead of platform_gk20a. JIRA NVGPU-16 Change-Id: I497f58c17e0be44e3622e49dad2ba44ed78cffbf Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1463539 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
a9c66768db
commit
b5a857210c
@@ -102,6 +102,8 @@ static void nvgpu_init_pm_vars(struct gk20a *g)
|
||||
nvgpu_platform_is_silicon(g) ? platform->enable_aelpg : false;
|
||||
g->mscg_enabled =
|
||||
nvgpu_platform_is_silicon(g) ? platform->enable_mscg : false;
|
||||
g->can_elpg =
|
||||
nvgpu_platform_is_silicon(g) ? platform->can_elpg : false;
|
||||
|
||||
/* set default values to aelpg parameters */
|
||||
g->pmu.aelpg_param[0] = APCTRL_SAMPLING_PERIOD_PG_DEFAULT_US;
|
||||
|
||||
@@ -981,6 +981,7 @@ struct gk20a {
|
||||
bool elcg_enabled;
|
||||
bool elpg_enabled;
|
||||
bool aelpg_enabled;
|
||||
bool can_elpg;
|
||||
bool mscg_enabled;
|
||||
bool forced_idle;
|
||||
bool forced_reset;
|
||||
|
||||
@@ -3326,12 +3326,11 @@ void pmu_setup_hw(struct work_struct *work)
|
||||
{
|
||||
struct pmu_gk20a *pmu = container_of(work, struct pmu_gk20a, pg_init);
|
||||
struct gk20a *g = gk20a_from_pmu(pmu);
|
||||
struct gk20a_platform *platform = dev_get_drvdata(g->dev);
|
||||
|
||||
switch (pmu->pmu_state) {
|
||||
case PMU_STATE_INIT_RECEIVED:
|
||||
gk20a_dbg_pmu("pmu starting");
|
||||
if (platform->can_elpg)
|
||||
if (g->can_elpg)
|
||||
pmu_init_powergating(g);
|
||||
break;
|
||||
case PMU_STATE_ELPG_BOOTED:
|
||||
|
||||
Reference in New Issue
Block a user