mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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 <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1812287 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
34d552957d
commit
7405cd9a6d
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user