summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/perf/vfe_equ.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-06 16:02:43 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-10 15:24:22 -0400
commit3a1104c3699b05201abf48ed9283bb8ccbe42732 (patch)
treea2e9445f730e9de76cbb7e68d3410a97ded588fa /drivers/gpu/nvgpu/perf/vfe_equ.c
parent54eb74539342ce0fa6961e46f2ce22b68ad2fb21 (diff)
gpu: nvgpu: therm: 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: I50bab058076c6896acfc6fa82f78f52a949dd3cf Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1457354 Reviewed-by: Alex Waterman <alexw@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/perf/vfe_equ.c')
-rw-r--r--drivers/gpu/nvgpu/perf/vfe_equ.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/perf/vfe_equ.c b/drivers/gpu/nvgpu/perf/vfe_equ.c
index f8a79a22..bb443265 100644
--- a/drivers/gpu/nvgpu/perf/vfe_equ.c
+++ b/drivers/gpu/nvgpu/perf/vfe_equ.c
@@ -34,8 +34,7 @@ static u32 _vfe_equs_pmudatainit(struct gk20a *g,
34 34
35 status = boardobjgrp_pmudatainit_e255(g, pboardobjgrp, pboardobjgrppmu); 35 status = boardobjgrp_pmudatainit_e255(g, pboardobjgrp, pboardobjgrppmu);
36 if (status) { 36 if (status) {
37 gk20a_err(dev_from_gk20a(g), 37 nvgpu_err(g, "error updating pmu boardobjgrp for vfe equ 0x%x",
38 "error updating pmu boardobjgrp for vfe equ 0x%x",
39 status); 38 status);
40 goto done; 39 goto done;
41 } 40 }
@@ -74,7 +73,7 @@ u32 vfe_equ_sw_setup(struct gk20a *g)
74 73
75 status = boardobjgrpconstruct_e255(&g->perf_pmu.vfe_equobjs.super); 74 status = boardobjgrpconstruct_e255(&g->perf_pmu.vfe_equobjs.super);
76 if (status) { 75 if (status) {
77 gk20a_err(dev_from_gk20a(g), 76 nvgpu_err(g,
78 "error creating boardobjgrp for clk domain, status - 0x%x", 77 "error creating boardobjgrp for clk domain, status - 0x%x",
79 status); 78 status);
80 goto done; 79 goto done;
@@ -88,7 +87,7 @@ u32 vfe_equ_sw_setup(struct gk20a *g)
88 status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp, 87 status = BOARDOBJGRP_PMU_CMD_GRP_SET_CONSTRUCT(g, pboardobjgrp,
89 perf, PERF, vfe_equ, VFE_EQU); 88 perf, PERF, vfe_equ, VFE_EQU);
90 if (status) { 89 if (status) {
91 gk20a_err(dev_from_gk20a(g), 90 nvgpu_err(g,
92 "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x", 91 "error constructing PMU_BOARDOBJ_CMD_GRP_SET interface - 0x%x",
93 status); 92 status);
94 goto done; 93 goto done;
@@ -223,8 +222,7 @@ static u32 devinit_get_vfe_equ_table(struct gk20a *g,
223 break; 222 break;
224 223
225 default: 224 default:
226 gk20a_err(dev_from_gk20a(g), 225 nvgpu_err(g, "unrecognized output id @vfeequ index %d",
227 "unrecognized output id @vfeequ index %d",
228 index); 226 index);
229 goto done; 227 goto done;
230 } 228 }
@@ -278,7 +276,7 @@ static u32 devinit_get_vfe_equ_table(struct gk20a *g,
278 CTRL_PERF_VFE_EQU_COMPARE_FUNCTION_GREATER; 276 CTRL_PERF_VFE_EQU_COMPARE_FUNCTION_GREATER;
279 break; 277 break;
280 default: 278 default:
281 gk20a_err(dev_from_gk20a(g), 279 nvgpu_err(g,
282 "invalid vfe compare index %x type %x ", 280 "invalid vfe compare index %x type %x ",
283 index, cmp_func); 281 index, cmp_func);
284 status = -EINVAL; 282 status = -EINVAL;
@@ -295,8 +293,7 @@ static u32 devinit_get_vfe_equ_table(struct gk20a *g,
295 } 293 }
296 default: 294 default:
297 status = -EINVAL; 295 status = -EINVAL;
298 gk20a_err(dev_from_gk20a(g), 296 nvgpu_err(g, "Invalid equ[%d].type = 0x%x.",
299 "Invalid equ[%d].type = 0x%x.",
300 index, (u8)equ.type); 297 index, (u8)equ.type);
301 goto done; 298 goto done;
302 } 299 }
@@ -305,7 +302,7 @@ static u32 devinit_get_vfe_equ_table(struct gk20a *g,
305 pequ = construct_vfe_equ(g, (void *)&equ_data); 302 pequ = construct_vfe_equ(g, (void *)&equ_data);
306 303
307 if (pequ == NULL) { 304 if (pequ == NULL) {
308 gk20a_err(dev_from_gk20a(g), 305 nvgpu_err(g,
309 "error constructing vfe_equ boardobj %d", index); 306 "error constructing vfe_equ boardobj %d", index);
310 status = -EINVAL; 307 status = -EINVAL;
311 goto done; 308 goto done;
@@ -314,8 +311,7 @@ static u32 devinit_get_vfe_equ_table(struct gk20a *g,
314 status = boardobjgrp_objinsert(&pvfeequobjs->super.super, 311 status = boardobjgrp_objinsert(&pvfeequobjs->super.super,
315 (struct boardobj *)pequ, index); 312 (struct boardobj *)pequ, index);
316 if (status) { 313 if (status) {
317 gk20a_err(dev_from_gk20a(g), 314 nvgpu_err(g, "error adding vfe_equ boardobj %d", index);
318 "error adding vfe_equ boardobj %d", index);
319 status = -EINVAL; 315 status = -EINVAL;
320 goto done; 316 goto done;
321 } 317 }