diff options
author | Mahantesh Kumbar <mkumbar@nvidia.com> | 2015-12-22 00:05:01 -0500 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-01-04 13:04:29 -0500 |
commit | 47bd35e1535abe614c8f9540ca0914b6f45fb2ca (patch) | |
tree | d4bb499ca05425ef8c5cc4afd7f334841f8cc47f /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |
parent | 851188a5acc458c336af1c22bca1a7fa8b613f0a (diff) |
gpu: nvgpu: Enable ELPG when disabled due to reset
Enable ELPG back whenever ELPG disable is done due to reset or recovery.
Otherwise elpg_refcnt mismatch doesn’t engage ELPG correctly
Bug 200156347
Change-Id: Ic01f85b9e1eff10cfb9cb180b50b045f67d4b33c
Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-on: http://git-master/r/925763
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 1727cf1d..d8a73a75 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -780,6 +780,7 @@ void gk20a_fifo_reset_engine(struct gk20a *g, u32 engine_id) | |||
780 | /* resetting engine using mc_enable_r() is not | 780 | /* resetting engine using mc_enable_r() is not |
781 | enough, we do full init sequence */ | 781 | enough, we do full init sequence */ |
782 | gk20a_gr_reset(g); | 782 | gk20a_gr_reset(g); |
783 | gk20a_pmu_enable_elpg(g); | ||
783 | } | 784 | } |
784 | if (engine_id == top_device_info_type_enum_copy0_v()) | 785 | if (engine_id == top_device_info_type_enum_copy0_v()) |
785 | gk20a_reset(g, mc_enable_ce2_m()); | 786 | gk20a_reset(g, mc_enable_ce2_m()); |
@@ -1086,7 +1087,7 @@ static bool gk20a_fifo_handle_mmu_fault( | |||
1086 | " deferring channel recovery to channel free"); | 1087 | " deferring channel recovery to channel free"); |
1087 | /* clear interrupt */ | 1088 | /* clear interrupt */ |
1088 | gk20a_writel(g, fifo_intr_mmu_fault_id_r(), fault_id); | 1089 | gk20a_writel(g, fifo_intr_mmu_fault_id_r(), fault_id); |
1089 | return verbose; | 1090 | goto exit_enable; |
1090 | } | 1091 | } |
1091 | 1092 | ||
1092 | /* clear interrupt */ | 1093 | /* clear interrupt */ |
@@ -1101,6 +1102,7 @@ static bool gk20a_fifo_handle_mmu_fault( | |||
1101 | gr_gpfifo_ctl_access_enabled_f() | | 1102 | gr_gpfifo_ctl_access_enabled_f() | |
1102 | gr_gpfifo_ctl_semaphore_access_enabled_f()); | 1103 | gr_gpfifo_ctl_semaphore_access_enabled_f()); |
1103 | 1104 | ||
1105 | exit_enable: | ||
1104 | /* It is safe to enable ELPG again. */ | 1106 | /* It is safe to enable ELPG again. */ |
1105 | if (support_gk20a_pmu(g->dev) && g->elpg_enabled) | 1107 | if (support_gk20a_pmu(g->dev) && g->elpg_enabled) |
1106 | gk20a_pmu_enable_elpg(g); | 1108 | gk20a_pmu_enable_elpg(g); |