summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/ltc_gm20b.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/gm20b/ltc_gm20b.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/gm20b/ltc_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/ltc_gm20b.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
index 522cd1dc..9090be23 100644
--- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
@@ -53,10 +53,8 @@ static int gm20b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
53 53
54 gk20a_dbg_fn(""); 54 gk20a_dbg_fn("");
55 55
56 if (max_comptag_lines == 0) { 56 if (max_comptag_lines == 0)
57 gr->compbit_store.size = 0;
58 return 0; 57 return 0;
59 }
60 58
61 if (max_comptag_lines > hw_max_comptag_lines) 59 if (max_comptag_lines > hw_max_comptag_lines)
62 max_comptag_lines = hw_max_comptag_lines; 60 max_comptag_lines = hw_max_comptag_lines;
@@ -117,7 +115,7 @@ int gm20b_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);