summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2015-03-20 12:43:26 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-04-04 22:01:53 -0400
commit42d17018b442850f246696364d79a2ae11350a12 (patch)
tree0ba6ca38145df8cab758cfa2b7bf50b5f825884a /drivers/gpu/nvgpu/gk20a/ltc_gk20a.c
parent90e42e424aba21aed9aa380795cd564cfe97da28 (diff)
gpu: nvgpu: Use common allocator for compbit store
Reduce amount of duplicate code around memory allocation by using common helpers, and common data structure for storing results of allocations. Bug 1605769 Change-Id: I7c1662b669ed8c86465254f6001e536141051ee5 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/720435
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ltc_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ltc_gk20a.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c
index 1a780212..c5d0f0c4 100644
--- a/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/ltc_gk20a.c
@@ -51,10 +51,8 @@ static int gk20a_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
51 51
52 gk20a_dbg_fn(""); 52 gk20a_dbg_fn("");
53 53
54 if (max_comptag_lines == 0) { 54 if (max_comptag_lines == 0)
55 gr->compbit_store.size = 0;
56 return 0; 55 return 0;
57 }
58 56
59 if (max_comptag_lines > hw_max_comptag_lines) 57 if (max_comptag_lines > hw_max_comptag_lines)
60 max_comptag_lines = hw_max_comptag_lines; 58 max_comptag_lines = hw_max_comptag_lines;
@@ -117,7 +115,7 @@ static int gk20a_ltc_cbc_ctrl(struct gk20a *g, enum gk20a_cbc_op op,
117 115
118 trace_gk20a_ltc_cbc_ctrl_start(g->dev->name, op, min, max); 116 trace_gk20a_ltc_cbc_ctrl_start(g->dev->name, op, min, max);
119 117
120 if (gr->compbit_store.size == 0) 118 if (gr->compbit_store.mem.size == 0)
121 return 0; 119 return 0;
122 120
123 mutex_lock(&g->mm.l2_op_lock); 121 mutex_lock(&g->mm.l2_op_lock);