diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-05-12 13:32:11 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-05-17 13:24:25 -0400 |
commit | 2c822a63885ec79ac2d860e13438c6154e23e5d0 (patch) | |
tree | eab486eb38d2d74b211ad94e4c1d28368922a23c /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |
parent | 39a9e251da0fb4da8512593d3ce4f6eba47d5e0c (diff) |
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>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index f212e55b..d6043df2 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -1206,7 +1206,6 @@ static inline void get_exception_mmu_fault_info( | |||
1206 | void gk20a_fifo_reset_engine(struct gk20a *g, u32 engine_id) | 1206 | void gk20a_fifo_reset_engine(struct gk20a *g, u32 engine_id) |
1207 | { | 1207 | { |
1208 | struct fifo_gk20a *f = NULL; | 1208 | struct fifo_gk20a *f = NULL; |
1209 | struct gk20a_platform *platform; | ||
1210 | u32 engine_enum = ENGINE_INVAL_GK20A; | 1209 | u32 engine_enum = ENGINE_INVAL_GK20A; |
1211 | u32 inst_id = 0; | 1210 | u32 inst_id = 0; |
1212 | struct fifo_engine_info_gk20a *engine_info; | 1211 | struct fifo_engine_info_gk20a *engine_info; |
@@ -1217,7 +1216,6 @@ void gk20a_fifo_reset_engine(struct gk20a *g, u32 engine_id) | |||
1217 | return; | 1216 | return; |
1218 | 1217 | ||
1219 | f = &g->fifo; | 1218 | f = &g->fifo; |
1220 | platform = dev_get_drvdata(g->dev); | ||
1221 | 1219 | ||
1222 | engine_info = gk20a_fifo_get_engine_info(g, engine_id); | 1220 | engine_info = gk20a_fifo_get_engine_info(g, engine_id); |
1223 | 1221 | ||
@@ -1230,7 +1228,7 @@ void gk20a_fifo_reset_engine(struct gk20a *g, u32 engine_id) | |||
1230 | nvgpu_err(g, "unsupported engine_id %d", engine_id); | 1228 | nvgpu_err(g, "unsupported engine_id %d", engine_id); |
1231 | 1229 | ||
1232 | if (engine_enum == ENGINE_GR_GK20A) { | 1230 | if (engine_enum == ENGINE_GR_GK20A) { |
1233 | if (g->support_pmu && platform->can_elpg) | 1231 | if (g->support_pmu && g->can_elpg) |
1234 | gk20a_pmu_disable_elpg(g); | 1232 | gk20a_pmu_disable_elpg(g); |
1235 | /* resetting engine will alter read/write index. | 1233 | /* resetting engine will alter read/write index. |
1236 | * need to flush circular buffer before re-enabling FECS. | 1234 | * need to flush circular buffer before re-enabling FECS. |
@@ -1243,7 +1241,7 @@ void gk20a_fifo_reset_engine(struct gk20a *g, u32 engine_id) | |||
1243 | /* resetting engine using mc_enable_r() is not | 1241 | /* resetting engine using mc_enable_r() is not |
1244 | enough, we do full init sequence */ | 1242 | enough, we do full init sequence */ |
1245 | gk20a_gr_reset(g); | 1243 | gk20a_gr_reset(g); |
1246 | if (g->support_pmu && platform->can_elpg) | 1244 | if (g->support_pmu && g->can_elpg) |
1247 | gk20a_pmu_enable_elpg(g); | 1245 | gk20a_pmu_enable_elpg(g); |
1248 | } | 1246 | } |
1249 | if ((engine_enum == ENGINE_GRCE_GK20A) || | 1247 | if ((engine_enum == ENGINE_GRCE_GK20A) || |
@@ -1468,7 +1466,6 @@ static bool gk20a_fifo_handle_mmu_fault( | |||
1468 | bool id_is_tsg) | 1466 | bool id_is_tsg) |
1469 | { | 1467 | { |
1470 | bool fake_fault; | 1468 | bool fake_fault; |
1471 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | ||
1472 | unsigned long fault_id; | 1469 | unsigned long fault_id; |
1473 | unsigned long engine_mmu_fault_id; | 1470 | unsigned long engine_mmu_fault_id; |
1474 | bool verbose = true; | 1471 | bool verbose = true; |
@@ -1479,7 +1476,7 @@ static bool gk20a_fifo_handle_mmu_fault( | |||
1479 | g->fifo.deferred_reset_pending = false; | 1476 | g->fifo.deferred_reset_pending = false; |
1480 | 1477 | ||
1481 | /* Disable power management */ | 1478 | /* Disable power management */ |
1482 | if (g->support_pmu && platform->can_elpg) | 1479 | if (g->support_pmu && g->can_elpg) |
1483 | gk20a_pmu_disable_elpg(g); | 1480 | gk20a_pmu_disable_elpg(g); |
1484 | if (g->ops.clock_gating.slcg_gr_load_gating_prod) | 1481 | if (g->ops.clock_gating.slcg_gr_load_gating_prod) |
1485 | g->ops.clock_gating.slcg_gr_load_gating_prod(g, | 1482 | g->ops.clock_gating.slcg_gr_load_gating_prod(g, |
@@ -1678,7 +1675,7 @@ static bool gk20a_fifo_handle_mmu_fault( | |||
1678 | gr_gpfifo_ctl_semaphore_access_enabled_f()); | 1675 | gr_gpfifo_ctl_semaphore_access_enabled_f()); |
1679 | 1676 | ||
1680 | /* It is safe to enable ELPG again. */ | 1677 | /* It is safe to enable ELPG again. */ |
1681 | if (g->support_pmu && platform->can_elpg) | 1678 | if (g->support_pmu && g->can_elpg) |
1682 | gk20a_pmu_enable_elpg(g); | 1679 | gk20a_pmu_enable_elpg(g); |
1683 | 1680 | ||
1684 | return verbose; | 1681 | return verbose; |