summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp106/gr_gp106.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-06 15:09:01 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-07 16:48:24 -0400
commit86ecddf68734e4a938eda351f4dde11ab507de3f (patch)
tree3a8d89ace77fc3427da6243c81f224883954e8e9 /drivers/gpu/nvgpu/gp106/gr_gp106.c
parentbb72b7e2ed215b26e1d9b94534c24ab4cfa52801 (diff)
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 <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1457346 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/gr_gp106.c')
-rw-r--r--drivers/gpu/nvgpu/gp106/gr_gp106.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gp106/gr_gp106.c b/drivers/gpu/nvgpu/gp106/gr_gp106.c
index a804f9bb..08d6ec28 100644
--- a/drivers/gpu/nvgpu/gp106/gr_gp106.c
+++ b/drivers/gpu/nvgpu/gp106/gr_gp106.c
@@ -167,8 +167,7 @@ static int gr_gp106_set_ctxsw_preemption_mode(struct gk20a *g,
167 g->gr.t18x.ctx_vars.preempt_image_size, 167 g->gr.t18x.ctx_vars.preempt_image_size,
168 &gr_ctx->t18x.preempt_ctxsw_buffer); 168 &gr_ctx->t18x.preempt_ctxsw_buffer);
169 if (err) { 169 if (err) {
170 gk20a_err(dev_from_gk20a(g), 170 nvgpu_err(g, "cannot allocate preempt buffer");
171 "cannot allocate preempt buffer");
172 goto fail; 171 goto fail;
173 } 172 }
174 173
@@ -176,8 +175,7 @@ static int gr_gp106_set_ctxsw_preemption_mode(struct gk20a *g,
176 spill_size, 175 spill_size,
177 &gr_ctx->t18x.spill_ctxsw_buffer); 176 &gr_ctx->t18x.spill_ctxsw_buffer);
178 if (err) { 177 if (err) {
179 gk20a_err(dev_from_gk20a(g), 178 nvgpu_err(g, "cannot allocate spill buffer");
180 "cannot allocate spill buffer");
181 goto fail_free_preempt; 179 goto fail_free_preempt;
182 } 180 }
183 181
@@ -185,8 +183,7 @@ static int gr_gp106_set_ctxsw_preemption_mode(struct gk20a *g,
185 attrib_cb_size, 183 attrib_cb_size,
186 &gr_ctx->t18x.betacb_ctxsw_buffer); 184 &gr_ctx->t18x.betacb_ctxsw_buffer);
187 if (err) { 185 if (err) {
188 gk20a_err(dev_from_gk20a(g), 186 nvgpu_err(g, "cannot allocate beta buffer");
189 "cannot allocate beta buffer");
190 goto fail_free_spill; 187 goto fail_free_spill;
191 } 188 }
192 189
@@ -194,8 +191,7 @@ static int gr_gp106_set_ctxsw_preemption_mode(struct gk20a *g,
194 pagepool_size, 191 pagepool_size,
195 &gr_ctx->t18x.pagepool_ctxsw_buffer); 192 &gr_ctx->t18x.pagepool_ctxsw_buffer);
196 if (err) { 193 if (err) {
197 gk20a_err(dev_from_gk20a(g), 194 nvgpu_err(g, "cannot allocate page pool");
198 "cannot allocate page pool");
199 goto fail_free_betacb; 195 goto fail_free_betacb;
200 } 196 }
201 197