summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/clk/clk.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-06 15:17:26 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-07 16:48:24 -0400
commit1add126551309a323ae422be41c9db2203bbe112 (patch)
treed9a620ca88a3c73c0f3dc0f7079ea4d3c24eb075 /drivers/gpu/nvgpu/clk/clk.c
parent86ecddf68734e4a938eda351f4dde11ab507de3f (diff)
gpu: nvgpu: clk: 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: I58bb9e2fb7e5b18f74fbb92b70150cce97968fc3 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1457347 Reviewed-by: Alex Waterman <alexw@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk.c')
-rw-r--r--drivers/gpu/nvgpu/clk/clk.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk.c b/drivers/gpu/nvgpu/clk/clk.c
index e809b5e9..8b36394d 100644
--- a/drivers/gpu/nvgpu/clk/clk.c
+++ b/drivers/gpu/nvgpu/clk/clk.c
@@ -36,8 +36,7 @@ static void clkrpc_pmucmdhandler(struct gk20a *g, struct pmu_msg *msg,
36 gk20a_dbg_info(""); 36 gk20a_dbg_info("");
37 37
38 if (msg->msg.clk.msg_type != NV_PMU_CLK_MSG_ID_RPC) { 38 if (msg->msg.clk.msg_type != NV_PMU_CLK_MSG_ID_RPC) {
39 gk20a_err(dev_from_gk20a(g), 39 nvgpu_err(g, "unsupported msg for VFE LOAD RPC %x",
40 "unsupported msg for VFE LOAD RPC %x",
41 msg->msg.clk.msg_type); 40 msg->msg.clk.msg_type);
42 return; 41 return;
43 } 42 }
@@ -99,8 +98,7 @@ int clk_pmu_freq_controller_load(struct gk20a *g, bool bload)
99 &seqdesc, ~0); 98 &seqdesc, ~0);
100 99
101 if (status) { 100 if (status) {
102 gk20a_err(dev_from_gk20a(g), 101 nvgpu_err(g, "unable to post clk RPC cmd %x",
103 "unable to post clk RPC cmd %x",
104 cmd.cmd.clk.cmd_type); 102 cmd.cmd.clk.cmd_type);
105 goto done; 103 goto done;
106 } 104 }
@@ -110,7 +108,7 @@ int clk_pmu_freq_controller_load(struct gk20a *g, bool bload)
110 &handler.success, 1); 108 &handler.success, 1);
111 109
112 if (handler.success == 0) { 110 if (handler.success == 0) {
113 gk20a_err(dev_from_gk20a(g), "rpc call to load freq cntlr cal failed"); 111 nvgpu_err(g, "rpc call to load freq cntlr cal failed");
114 status = -EINVAL; 112 status = -EINVAL;
115 } 113 }
116 114
@@ -159,8 +157,7 @@ u32 clk_pmu_vin_load(struct gk20a *g)
159 &seqdesc, ~0); 157 &seqdesc, ~0);
160 158
161 if (status) { 159 if (status) {
162 gk20a_err(dev_from_gk20a(g), 160 nvgpu_err(g, "unable to post clk RPC cmd %x",
163 "unable to post clk RPC cmd %x",
164 cmd.cmd.clk.cmd_type); 161 cmd.cmd.clk.cmd_type);
165 goto done; 162 goto done;
166 } 163 }
@@ -170,7 +167,7 @@ u32 clk_pmu_vin_load(struct gk20a *g)
170 &handler.success, 1); 167 &handler.success, 1);
171 168
172 if (handler.success == 0) { 169 if (handler.success == 0) {
173 gk20a_err(dev_from_gk20a(g), "rpc call to load vin cal failed"); 170 nvgpu_err(g, "rpc call to load vin cal failed");
174 status = -EINVAL; 171 status = -EINVAL;
175 } 172 }
176 173
@@ -258,8 +255,7 @@ static u32 clk_pmu_vf_inject(struct gk20a *g, struct set_fll_clk *setfllclk)
258 &seqdesc, ~0); 255 &seqdesc, ~0);
259 256
260 if (status) { 257 if (status) {
261 gk20a_err(dev_from_gk20a(g), 258 nvgpu_err(g, "unable to post clk RPC cmd %x",
262 "unable to post clk RPC cmd %x",
263 cmd.cmd.clk.cmd_type); 259 cmd.cmd.clk.cmd_type);
264 goto done; 260 goto done;
265 } 261 }
@@ -269,7 +265,7 @@ static u32 clk_pmu_vf_inject(struct gk20a *g, struct set_fll_clk *setfllclk)
269 &handler.success, 1); 265 &handler.success, 1);
270 266
271 if (handler.success == 0) { 267 if (handler.success == 0) {
272 gk20a_err(dev_from_gk20a(g), "rpc call to inject clock failed"); 268 nvgpu_err(g, "rpc call to inject clock failed");
273 status = -EINVAL; 269 status = -EINVAL;
274 } 270 }
275done: 271done:
@@ -359,8 +355,7 @@ int clk_set_fll_clks(struct gk20a *g, struct set_fll_clk *setfllclk)
359 status = clk_pmu_vf_inject(g, setfllclk); 355 status = clk_pmu_vf_inject(g, setfllclk);
360 356
361 if (status) 357 if (status)
362 gk20a_err(dev_from_gk20a(g), 358 nvgpu_err(g, "vf inject to change clk failed");
363 "vf inject to change clk failed");
364 359
365 /* save regime ids */ 360 /* save regime ids */
366 status = set_regime_id(g, CTRL_CLK_DOMAIN_XBAR2CLK, 361 status = set_regime_id(g, CTRL_CLK_DOMAIN_XBAR2CLK,