summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c3
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c9
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
index 34910152..3fb003bf 100644
--- a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * GK20A Cycle stats snapshots support (subsystem for gr_gk20a). 2 * GK20A Cycle stats snapshots support (subsystem for gr_gk20a).
3 * 3 *
4 * Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. 4 * Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License, 7 * under the terms and conditions of the GNU General Public License,
@@ -757,4 +757,5 @@ void gr_gk20a_free_cyclestats_snapshot_data(struct gk20a *g)
757 mutex_lock(&gr->cs_lock); 757 mutex_lock(&gr->cs_lock);
758 css_gr_free_shared_data(gr); 758 css_gr_free_shared_data(gr);
759 mutex_unlock(&gr->cs_lock); 759 mutex_unlock(&gr->cs_lock);
760 mutex_destroy(&gr->cs_lock);
760} 761}
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 542a6c02..dbaa520d 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -4441,6 +4441,10 @@ static int gk20a_init_gr_setup_sw(struct gk20a *g)
4441 mutex_init(&gr->ctx_mutex); 4441 mutex_init(&gr->ctx_mutex);
4442 spin_lock_init(&gr->ch_tlb_lock); 4442 spin_lock_init(&gr->ch_tlb_lock);
4443 4443
4444#if defined(CONFIG_GK20A_CYCLE_STATS)
4445 mutex_init(&g->gr.cs_lock);
4446#endif
4447
4444 gr->remove_support = gk20a_remove_gr_support; 4448 gr->remove_support = gk20a_remove_gr_support;
4445 gr->sw_ready = true; 4449 gr->sw_ready = true;
4446 4450
@@ -4507,11 +4511,6 @@ int gk20a_init_gr_support(struct gk20a *g)
4507 4511
4508 gk20a_dbg_fn(""); 4512 gk20a_dbg_fn("");
4509 4513
4510#if defined(CONFIG_GK20A_CYCLE_STATS)
4511 mutex_init(&g->gr.cs_lock);
4512 g->gr.cs_data = NULL;
4513#endif
4514
4515 /* this is required before gr_gk20a_init_ctx_state */ 4514 /* this is required before gr_gk20a_init_ctx_state */
4516 mutex_init(&g->gr.fecs_mutex); 4515 mutex_init(&g->gr.fecs_mutex);
4517 4516