From 9e13fd900d3875439b656583d161b7bed5a72dc8 Mon Sep 17 00:00:00 2001 From: Sagar Kadamati Date: Tue, 16 Feb 2021 17:02:11 +0530 Subject: [PATCH] nvgpu: gpu: update runlist in vserver On QNX, Setting runlist is not happening till runlist submit. On Linux, Setting runlist is happening at the time of channel open. due to implimentations, which effect's channel configuration. We need runlist for channel configuration from now. Adding runlist parameter for below calls * TEGRA_VGPU_CMD_TSG_BIND_CHANNEL * TEGRA_VGPU_CMD_TSG_BIND_CHANNEL_EX Bug 200701789 Change-Id: Ibd3262b43e38f54c76c4ae67ce683eccf4460cdc Signed-off-by: Sagar Kadamati Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2485256 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: svc-mobile-cert Reviewed-by: Richard Zhao Reviewed-by: Aparna Das Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/common/vgpu/fifo/tsg_vgpu.c | 5 ++++- drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/common/vgpu/fifo/tsg_vgpu.c b/drivers/gpu/nvgpu/common/vgpu/fifo/tsg_vgpu.c index 8814881a9..5f3d37d4b 100644 --- a/drivers/gpu/nvgpu/common/vgpu/fifo/tsg_vgpu.c +++ b/drivers/gpu/nvgpu/common/vgpu/fifo/tsg_vgpu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2021, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -105,6 +106,7 @@ int vgpu_tsg_bind_channel(struct nvgpu_tsg *tsg, struct nvgpu_channel *ch) msg.cmd = TEGRA_VGPU_CMD_TSG_BIND_CHANNEL; p->tsg_id = tsg->tsgid; p->ch_handle = ch->virt_ctx; + p->runlist_id = ch->runlist->id; } else { struct tegra_vgpu_tsg_bind_channel_ex_params *p = &msg.params.tsg_bind_channel_ex; @@ -112,6 +114,7 @@ int vgpu_tsg_bind_channel(struct nvgpu_tsg *tsg, struct nvgpu_channel *ch) msg.cmd = TEGRA_VGPU_CMD_TSG_BIND_CHANNEL_EX; p->tsg_id = tsg->tsgid; p->ch_handle = ch->virt_ctx; + p->runlist_id = ch->runlist->id; p->subctx_id = ch->subctx_id; p->runqueue_sel = ch->runqueue_sel; } diff --git a/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h index 596b30de6..3680e1dcb 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vgpu/tegra_vgpu.h @@ -1,7 +1,7 @@ /* * Tegra GPU Virtualization Interfaces to Server * - * Copyright (c) 2014-2020, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2021, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -407,6 +407,7 @@ struct tegra_vgpu_gr_ctx_params { struct tegra_vgpu_tsg_bind_unbind_channel_params { u32 tsg_id; u64 ch_handle; + u32 runlist_id; }; struct tegra_vgpu_tsg_preempt_params { @@ -632,6 +633,7 @@ struct tegra_vgpu_map_syncpt_params { struct tegra_vgpu_tsg_bind_channel_ex_params { u32 tsg_id; u64 ch_handle; + u32 runlist_id; u32 subctx_id; u32 runqueue_sel; };