summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk_arb.c
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2017-09-07 19:12:44 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-09-15 14:25:35 -0400
commitef6ea3475cac013c174905ab4f7f187700ae2a33 (patch)
tree45b5c0c7c6990a317d401fa6e44145fea0e047c8 /drivers/gpu/nvgpu/clk/clk_arb.c
parent980bf96bf21868e9b1fd8c1ef68da534e97ccbb5 (diff)
gpu: nvgpu: Unify remove/shutdown codepaths
The following changes are part of the porting of the bind/unbind functionality. These changes reuse the shutdown codepaths in iGPU and dGPU and fix a locking issue with in gk20a_busy() where the usage count can lead to a deadlock during the driver shutdown. It fixes a racing condition with the gr/mm code by invalidating the sw ready flag while holding the busy lock JIRA: EVLR-1739 Change-Id: I62ce47378436b21f447f4cd93388759ed3f9bad1 Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1554959 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_arb.c')
-rw-r--r--drivers/gpu/nvgpu/clk/clk_arb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c
index 0204627b..4f09da74 100644
--- a/drivers/gpu/nvgpu/clk/clk_arb.c
+++ b/drivers/gpu/nvgpu/clk/clk_arb.c
@@ -489,9 +489,8 @@ void nvgpu_clk_arb_cleanup_arbiter(struct gk20a *g)
489 nvgpu_kfree(g, arb->vf_table_pool[index].gpc2clk_points); 489 nvgpu_kfree(g, arb->vf_table_pool[index].gpc2clk_points);
490 nvgpu_kfree(g, arb->vf_table_pool[index].mclk_points); 490 nvgpu_kfree(g, arb->vf_table_pool[index].mclk_points);
491 } 491 }
492 nvgpu_mutex_destroy(&g->clk_arb->pstate_lock);
492 } 493 }
493
494 nvgpu_mutex_destroy(&g->clk_arb->pstate_lock);
495 nvgpu_kfree(g, g->clk_arb); 494 nvgpu_kfree(g, g->clk_arb);
496 g->clk_arb = NULL; 495 g->clk_arb = NULL;
497} 496}