summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-10 14:09:13 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-10 23:24:35 -0400
commit7fe4b6572ba80dda58d513969b69e22437901077 (patch)
tree9c1f81710e4e159648fb54beed0f1c98b5811716 /drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
parent1a426c981c4fa2816d969b27163ab2dbc2fa4e89 (diff)
gpu: nvgpu: gv11b: 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: I8c0d8944f625e3c5b16a9f5a2a59d95a680f4e55 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1459822 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gv11b/subctx_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/gv11b/subctx_gv11b.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
index 8b322296..4d68926f 100644
--- a/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
+++ b/drivers/gpu/nvgpu/gv11b/subctx_gv11b.c
@@ -16,12 +16,13 @@
16 * this program. 16 * this program.
17 */ 17 */
18 18
19#include <nvgpu/dma.h>
20
21#include "gk20a/gk20a.h" 19#include "gk20a/gk20a.h"
22 20
23#include "gv11b/subctx_gv11b.h" 21#include "gv11b/subctx_gv11b.h"
24 22
23#include <nvgpu/dma.h>
24#include <nvgpu/log.h>
25
25#include <nvgpu/hw/gv11b/hw_ram_gv11b.h> 26#include <nvgpu/hw/gv11b/hw_ram_gv11b.h>
26#include <nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h> 27#include <nvgpu/hw/gv11b/hw_ctxsw_prog_gv11b.h>
27 28
@@ -58,8 +59,7 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c)
58 gr->ctx_vars.golden_image_size, 59 gr->ctx_vars.golden_image_size,
59 &ctx->mem); 60 &ctx->mem);
60 if (ret) { 61 if (ret) {
61 gk20a_err(dev_from_gk20a(g), 62 nvgpu_err(g, "failed to allocate sub ctx header");
62 "failed to allocate sub ctx header");
63 return ret; 63 return ret;
64 } 64 }
65 ctx->mem.gpu_va = gk20a_gmmu_map(c->vm, 65 ctx->mem.gpu_va = gk20a_gmmu_map(c->vm,
@@ -69,8 +69,7 @@ int gv11b_alloc_subctx_header(struct channel_gk20a *c)
69 gk20a_mem_flag_none, true, 69 gk20a_mem_flag_none, true,
70 ctx->mem.aperture); 70 ctx->mem.aperture);
71 if (!ctx->mem.gpu_va) { 71 if (!ctx->mem.gpu_va) {
72 gk20a_err(dev_from_gk20a(g), 72 nvgpu_err(g, "failed to map ctx header");
73 "failed to map ctx header");
74 nvgpu_dma_free(g, &ctx->mem); 73 nvgpu_dma_free(g, &ctx->mem);
75 return -ENOMEM; 74 return -ENOMEM;
76 } 75 }