From 7405cd9a6dcd22d04f48be07be4839c735994ada Mon Sep 17 00:00:00 2001 From: Konsta Holtta Date: Mon, 3 Sep 2018 15:50:09 +0300 Subject: gpu: nvgpu: move usermode buffer alloc to os_channel Allocation of usermode submit buffers is not chip specific but is operating system specific; the API belongs to the os_channel layer, not in the fifo ops HAL. Bug 200145225 Change-Id: I90adb47103ab4b2e888c3db191d78ceda35e777d Signed-off-by: Konsta Holtta Reviewed-on: https://git-master.nvidia.com/r/1812287 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/channel.c | 4 ++-- drivers/gpu/nvgpu/gk20a/gk20a.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/common/fifo/channel.c b/drivers/gpu/nvgpu/common/fifo/channel.c index 58b62ce7..45f5b736 100644 --- a/drivers/gpu/nvgpu/common/fifo/channel.c +++ b/drivers/gpu/nvgpu/common/fifo/channel.c @@ -1145,8 +1145,8 @@ int gk20a_channel_alloc_gpfifo(struct channel_gk20a *c, } if (gpfifo_args->flags & NVGPU_GPFIFO_FLAGS_USERMODE_SUPPORT) { - if (g->ops.fifo.alloc_usermode_buffers) { - err = g->ops.fifo.alloc_usermode_buffers(c, + if (g->os_channel.alloc_usermode_buffers) { + err = g->os_channel.alloc_usermode_buffers(c, gpfifo_args); if (err) { nvgpu_err(g, "Usermode buffer alloc failed"); diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 34d08b65..fac7c5df 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -722,8 +722,6 @@ struct gpu_ops { int (*channel_suspend)(struct gk20a *g); int (*channel_resume)(struct gk20a *g); void (*set_error_notifier)(struct channel_gk20a *ch, u32 error); - int (*alloc_usermode_buffers)(struct channel_gk20a *c, - struct nvgpu_gpfifo_args *gpfifo_args); #ifdef CONFIG_TEGRA_GK20A_NVHOST int (*alloc_syncpt_buf)(struct channel_gk20a *c, u32 syncpt_id, struct nvgpu_mem *syncpt_buf); @@ -1569,6 +1567,8 @@ struct gk20a { int (*copy_user_gpfifo)(struct nvgpu_gpfifo_entry *dest, struct nvgpu_gpfifo_userdata userdata, u32 start, u32 length); + int (*alloc_usermode_buffers)(struct channel_gk20a *c, + struct nvgpu_gpfifo_args *gpfifo_args); } os_channel; struct gk20a_scale_profile *scale_profile; -- cgit v1.2.2