From bb72b7e2ed215b26e1d9b94534c24ab4cfa52801 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 6 Apr 2017 11:01:46 -0700 Subject: 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 Reviewed-on: http://git-master/r/1457345 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gm20b/gr_gm20b.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'drivers/gpu/nvgpu/gm20b/gr_gm20b.c') diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c index ab169a60..74c35c02 100644 --- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c @@ -21,6 +21,7 @@ #include #include +#include #include "gk20a/gk20a.h" #include "gk20a/gr_gk20a.h" @@ -754,8 +755,7 @@ static int gr_gm20b_load_ctxsw_ucode(struct gk20a *g) (1 << LSF_FALCON_ID_GPCCS)); } if (err) { - gk20a_err(dev_from_gk20a(g), - "Unable to recover GR falcon"); + nvgpu_err(g, "Unable to recover GR falcon"); return err; } @@ -775,8 +775,7 @@ static int gr_gm20b_load_ctxsw_ucode(struct gk20a *g) err = g->ops.pmu.load_lsfalcon_ucode(g, falcon_id_mask); if (err) { - gk20a_err(dev_from_gk20a(g), - "Unable to boot GPCCS\n"); + nvgpu_err(g, "Unable to boot GPCCS"); return err; } } @@ -1294,7 +1293,7 @@ static int gm20b_gr_update_sm_error_state(struct gk20a *g, err = gr_gk20a_disable_ctxsw(g); if (err) { - gk20a_err(dev_from_gk20a(g), "unable to stop gr ctxsw\n"); + nvgpu_err(g, "unable to stop gr ctxsw"); goto fail; } @@ -1356,7 +1355,7 @@ static int gm20b_gr_clear_sm_error_state(struct gk20a *g, err = gr_gk20a_disable_ctxsw(g); if (err) { - gk20a_err(dev_from_gk20a(g), "unable to stop gr ctxsw\n"); + nvgpu_err(g, "unable to stop gr ctxsw"); goto fail; } @@ -1434,8 +1433,7 @@ static int gm20b_gr_fuse_override(struct gk20a *g) gm20b_gr_tpc_disable_override(g, value); break; default: - gk20a_err(dev_from_gk20a(g), - "ignore unknown fuse override %08x", fuse); + nvgpu_err(g, "ignore unknown fuse override %08x", fuse); break; } } -- cgit v1.2.2