diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-04-07 02:43:11 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-11 12:57:11 -0400 |
commit | a100422df5a7ab799d979a383d9bfb963d82e45a (patch) | |
tree | 6ddebda9f2b3db3aa261768b588ab5c938f9c34c /drivers | |
parent | 8f2f31354e0d4bafb28cc43dc9204c9c53a09018 (diff) |
gpu: nvgpu: re-add API to disable all engine activity
Patch e1e059454a00ea28c5c9ab992eaf7f7c6780c3b8
removed the API gk20a_fifo_disable_all_engine_activity()
which disables activity on all engines
Re-add it since it is now needed in the shutdown path
to ensure engines are idle
Bug 200281010
Change-Id: Idf5860f7f5009f3fb875ce94b7d66007c866ac49
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1457755
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 48253e59..c7db67fe 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -2808,6 +2808,41 @@ clean_up: | |||
2808 | return err; | 2808 | return err; |
2809 | } | 2809 | } |
2810 | 2810 | ||
2811 | int gk20a_fifo_disable_all_engine_activity(struct gk20a *g, | ||
2812 | bool wait_for_idle) | ||
2813 | { | ||
2814 | unsigned int i; | ||
2815 | int err = 0, ret = 0; | ||
2816 | u32 active_engine_id; | ||
2817 | |||
2818 | for (i = 0; i < g->fifo.num_engines; i++) { | ||
2819 | active_engine_id = g->fifo.active_engines_list[i]; | ||
2820 | err = gk20a_fifo_disable_engine_activity(g, | ||
2821 | &g->fifo.engine_info[active_engine_id], | ||
2822 | wait_for_idle); | ||
2823 | if (err) { | ||
2824 | nvgpu_err(g, "failed to disable engine %d activity\n", | ||
2825 | active_engine_id); | ||
2826 | ret = err; | ||
2827 | break; | ||
2828 | } | ||
2829 | } | ||
2830 | |||
2831 | if (err) { | ||
2832 | while (i-- != 0) { | ||
2833 | active_engine_id = g->fifo.active_engines_list[i]; | ||
2834 | err = gk20a_fifo_enable_engine_activity(g, | ||
2835 | &g->fifo.engine_info[active_engine_id]); | ||
2836 | if (err) | ||
2837 | nvgpu_err(g, | ||
2838 | "failed to re-enable engine %d activity\n", | ||
2839 | active_engine_id); | ||
2840 | } | ||
2841 | } | ||
2842 | |||
2843 | return ret; | ||
2844 | } | ||
2845 | |||
2811 | static void gk20a_fifo_runlist_reset_engines(struct gk20a *g, u32 runlist_id) | 2846 | static void gk20a_fifo_runlist_reset_engines(struct gk20a *g, u32 runlist_id) |
2812 | { | 2847 | { |
2813 | struct fifo_gk20a *f = &g->fifo; | 2848 | struct fifo_gk20a *f = &g->fifo; |