summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-06 14:01:46 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-07 16:48:18 -0400
commitbb72b7e2ed215b26e1d9b94534c24ab4cfa52801 (patch)
tree2a8e781838616f4640d7ef3e5c04ae7d996e0ecf /drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
parent85f27cec5d010d4ac0f4646f11f145d4b3a122e4 (diff)
gpu: nvgpu: gm20b: Use new error macros
gk20a_err() and gk20a_warn() require a struct device pointer, which is not portable across operating systems. The new nvgpu_err() and nvgpu_warn() macros take struct gk20a pointer. Convert code to use the more portable macros. JIRA NVGPU-16 Change-Id: Ic27fb98e03a982e5a1cf672cb4e8f87ecea10a5b Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1457345 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b/ltc_gm20b.c')
-rw-r--r--drivers/gpu/nvgpu/gm20b/ltc_gm20b.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
index 491112fc..be07f5a7 100644
--- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
@@ -153,8 +153,7 @@ int gm20b_ltc_cbc_ctrl(struct gk20a *g, enum gk20a_cbc_op op,
153 } while (!nvgpu_timeout_expired(&timeout)); 153 } while (!nvgpu_timeout_expired(&timeout));
154 154
155 if (nvgpu_timeout_peek_expired(&timeout)) { 155 if (nvgpu_timeout_peek_expired(&timeout)) {
156 gk20a_err(dev_from_gk20a(g), 156 nvgpu_err(g, "comp tag clear timeout");
157 "comp tag clear timeout\n");
158 err = -EBUSY; 157 err = -EBUSY;
159 goto out; 158 goto out;
160 } 159 }
@@ -201,8 +200,7 @@ void gm20b_ltc_isr(struct gk20a *g)
201 u32 lts_stride = nvgpu_get_litter_value(g, GPU_LIT_LTS_STRIDE); 200 u32 lts_stride = nvgpu_get_litter_value(g, GPU_LIT_LTS_STRIDE);
202 201
203 mc_intr = gk20a_readl(g, mc_intr_ltc_r()); 202 mc_intr = gk20a_readl(g, mc_intr_ltc_r());
204 gk20a_err(dev_from_gk20a(g), "mc_ltc_intr: %08x", 203 nvgpu_err(g, "mc_ltc_intr: %08x", mc_intr);
205 mc_intr);
206 for (ltc = 0; ltc < g->ltc_count; ltc++) { 204 for (ltc = 0; ltc < g->ltc_count; ltc++) {
207 if ((mc_intr & 1 << ltc) == 0) 205 if ((mc_intr & 1 << ltc) == 0)
208 continue; 206 continue;
@@ -210,7 +208,7 @@ void gm20b_ltc_isr(struct gk20a *g)
210 ltc_intr = gk20a_readl(g, ltc_ltc0_lts0_intr_r() + 208 ltc_intr = gk20a_readl(g, ltc_ltc0_lts0_intr_r() +
211 ltc_stride * ltc + 209 ltc_stride * ltc +
212 lts_stride * slice); 210 lts_stride * slice);
213 gk20a_err(dev_from_gk20a(g), "ltc%d, slice %d: %08x", 211 nvgpu_err(g, "ltc%d, slice %d: %08x",
214 ltc, slice, ltc_intr); 212 ltc, slice, ltc_intr);
215 gk20a_writel(g, ltc_ltc0_lts0_intr_r() + 213 gk20a_writel(g, ltc_ltc0_lts0_intr_r() +
216 ltc_stride * ltc + 214 ltc_stride * ltc +
@@ -226,8 +224,7 @@ u32 gm20b_ltc_cbc_fix_config(struct gk20a *g, int base)
226 if (val == 2) { 224 if (val == 2) {
227 return base * 2; 225 return base * 2;
228 } else if (val != 1) { 226 } else if (val != 1) {
229 gk20a_err(dev_from_gk20a(g), 227 nvgpu_err(g, "Invalid number of active ltcs: %08x\n", val);
230 "Invalid number of active ltcs: %08x\n", val);
231 } 228 }
232 229
233 return base; 230 return base;
@@ -335,8 +332,7 @@ static int gm20b_determine_L2_size_bytes(struct gk20a *g)
335 ltc_ltc0_lts0_tstg_cfg1_active_sets_quarter_v()) { 332 ltc_ltc0_lts0_tstg_cfg1_active_sets_quarter_v()) {
336 sets = 16; 333 sets = 16;
337 } else { 334 } else {
338 dev_err(dev_from_gk20a(g), 335 nvgpu_err(g, "Unknown constant %u for active sets",
339 "Unknown constant %u for active sets",
340 (unsigned)active_sets_value); 336 (unsigned)active_sets_value);
341 sets = 0; 337 sets = 0;
342 } 338 }