From 721315298b0d02cedfd186ce3b61da1acd4020b8 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 26 Oct 2017 15:44:43 -0700 Subject: gpu: nvgpu: Make alloc_obj_ctx args Linux specific Use nvgpu_alloc_obj_ctx_args structure specific to Linux code only. Pass the fields of the structure as separate arguments to all common functions. gr_ops_gp10b.h referred to the struct, but it's not used anywhere, so delete the file. JIRA NVGPU-259 Change-Id: Idba78d48de1c30f205a42da2fe47a9f8c03735f1 Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master.nvidia.com/r/1586563 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/vgpu/gr_vgpu.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/gr_vgpu.c') diff --git a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c index d400f08e..fca02831 100644 --- a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c @@ -485,8 +485,7 @@ static int vgpu_gr_tsg_bind_gr_ctx(struct tsg_gk20a *tsg) return err; } -int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, - struct nvgpu_alloc_obj_ctx_args *args) +int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, u32 class_num, u32 flags) { struct gk20a *g = c->g; struct fifo_gk20a *f = &g->fifo; @@ -503,12 +502,12 @@ int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, return -EINVAL; } - if (!g->ops.gr.is_valid_class(g, args->class_num)) { - nvgpu_err(g, "invalid obj class 0x%x", args->class_num); + if (!g->ops.gr.is_valid_class(g, class_num)) { + nvgpu_err(g, "invalid obj class 0x%x", class_num); err = -EINVAL; goto out; } - c->obj_class = args->class_num; + c->obj_class = class_num; if (gk20a_is_channel_marked_as_tsg(c)) tsg = &f->tsg[c->tsgid]; @@ -518,8 +517,8 @@ int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, if (!ch_ctx->gr_ctx) { err = g->ops.gr.alloc_gr_ctx(g, &c->ch_ctx.gr_ctx, c->vm, - args->class_num, - args->flags); + class_num, + flags); if (!err) err = vgpu_gr_ch_bind_gr_ctx(c); if (err) { @@ -541,8 +540,8 @@ int vgpu_gr_alloc_obj_ctx(struct channel_gk20a *c, nvgpu_vm_get(tsg->vm); err = g->ops.gr.alloc_gr_ctx(g, &tsg->tsg_gr_ctx, c->vm, - args->class_num, - args->flags); + class_num, + flags); if (!err) err = vgpu_gr_tsg_bind_gr_ctx(tsg); if (err) { -- cgit v1.2.2