From 86ecddf68734e4a938eda351f4dde11ab507de3f Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 6 Apr 2017 12:09:01 -0700 Subject: gpu: nvgpu: gp106: 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: I18955b4c46c082883ee0bf589ab17cd66ab0add2 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1457346 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp106/pmu_gp106.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/gp106/pmu_gp106.c') diff --git a/drivers/gpu/nvgpu/gp106/pmu_gp106.c b/drivers/gpu/nvgpu/gp106/pmu_gp106.c index a2eef6ff..cadbd308 100644 --- a/drivers/gpu/nvgpu/gp106/pmu_gp106.c +++ b/drivers/gpu/nvgpu/gp106/pmu_gp106.c @@ -77,7 +77,7 @@ static int gp106_pmu_enable_hw(struct pmu_gk20a *pmu, bool enable) gk20a_writel(g, pwr_falcon_engine_r(), pwr_falcon_engine_reset_true_f()); gk20a_readl(g, pwr_falcon_engine_r()); - gk20a_err(dev_from_gk20a(g), "Falcon mem scrubbing timeout"); + nvgpu_err(g, "Falcon mem scrubbing timeout"); return -ETIMEDOUT; } else { /* DISBALE */ @@ -202,7 +202,7 @@ static void pmu_handle_param_msg(struct gk20a *g, struct pmu_msg *msg, gk20a_dbg_fn(""); if (status != 0) { - gk20a_err(dev_from_gk20a(g), "PG PARAM cmd aborted"); + nvgpu_err(g, "PG PARAM cmd aborted"); return; } @@ -222,7 +222,7 @@ static int gp106_pg_param_init(struct gk20a *g, u32 pg_engine_id) status = init_rppg(g); if (status != 0) { - gk20a_err(dev_from_gk20a(g), "RPPG init Failed"); + nvgpu_err(g, "RPPG init Failed"); return -1; } @@ -386,8 +386,7 @@ static int gp106_load_falcon_ucode(struct gk20a *g, u32 falconidmask) &g->ops.pmu.lspmuwprinitdone, 1); /* check again if it still not ready indicate an error */ if (!g->ops.pmu.lspmuwprinitdone) { - gk20a_err(dev_from_gk20a(g), - "PMU not ready to load LSF"); + nvgpu_err(g, "PMU not ready to load LSF"); return -ETIMEDOUT; } } -- cgit v1.2.2