gpu: nvgpu: Remove uses of platform->can_elpg

Remove newly introduced uses of gk20a_platform->can_elpg. Rename the
field to can_elpg_init and replace all uses with gk20a->can_elpg.

Change-Id: Id6e84d4c16159b5da80c583a8a94a9c5cc2423ec
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1480955
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Terje Bergstrom
2017-05-12 10:32:11 -07:00
committed by mobile promotions
parent 39a9e251da
commit 2c822a6388
10 changed files with 18 additions and 24 deletions

View File

@@ -1206,7 +1206,6 @@ static inline void get_exception_mmu_fault_info(
void gk20a_fifo_reset_engine(struct gk20a *g, u32 engine_id)
{
struct fifo_gk20a *f = NULL;
struct gk20a_platform *platform;
u32 engine_enum = ENGINE_INVAL_GK20A;
u32 inst_id = 0;
struct fifo_engine_info_gk20a *engine_info;
@@ -1217,7 +1216,6 @@ void gk20a_fifo_reset_engine(struct gk20a *g, u32 engine_id)
return;
f = &g->fifo;
platform = dev_get_drvdata(g->dev);
engine_info = gk20a_fifo_get_engine_info(g, engine_id);
@@ -1230,7 +1228,7 @@ void gk20a_fifo_reset_engine(struct gk20a *g, u32 engine_id)
nvgpu_err(g, "unsupported engine_id %d", engine_id);
if (engine_enum == ENGINE_GR_GK20A) {
if (g->support_pmu && platform->can_elpg)
if (g->support_pmu && g->can_elpg)
gk20a_pmu_disable_elpg(g);
/* resetting engine will alter read/write index.
* need to flush circular buffer before re-enabling FECS.
@@ -1243,7 +1241,7 @@ void gk20a_fifo_reset_engine(struct gk20a *g, u32 engine_id)
/* resetting engine using mc_enable_r() is not
enough, we do full init sequence */
gk20a_gr_reset(g);
if (g->support_pmu && platform->can_elpg)
if (g->support_pmu && g->can_elpg)
gk20a_pmu_enable_elpg(g);
}
if ((engine_enum == ENGINE_GRCE_GK20A) ||
@@ -1468,7 +1466,6 @@ static bool gk20a_fifo_handle_mmu_fault(
bool id_is_tsg)
{
bool fake_fault;
struct gk20a_platform *platform = dev_get_drvdata(g->dev);
unsigned long fault_id;
unsigned long engine_mmu_fault_id;
bool verbose = true;
@@ -1479,7 +1476,7 @@ static bool gk20a_fifo_handle_mmu_fault(
g->fifo.deferred_reset_pending = false;
/* Disable power management */
if (g->support_pmu && platform->can_elpg)
if (g->support_pmu && g->can_elpg)
gk20a_pmu_disable_elpg(g);
if (g->ops.clock_gating.slcg_gr_load_gating_prod)
g->ops.clock_gating.slcg_gr_load_gating_prod(g,
@@ -1678,7 +1675,7 @@ static bool gk20a_fifo_handle_mmu_fault(
gr_gpfifo_ctl_semaphore_access_enabled_f());
/* It is safe to enable ELPG again. */
if (g->support_pmu && platform->can_elpg)
if (g->support_pmu && g->can_elpg)
gk20a_pmu_enable_elpg(g);
return verbose;