mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: vgpu: add tsg release command
gv11b needs tsg release callback to release CE method buffer. Bug 2022929 Change-Id: I32e27a5fa49eb61b9c2fc72ea32034191a9be48e Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1611631 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Thomas Fleury <tfleury@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Aparna Das <aparnad@nvidia.com> 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
7f0aa103ea
commit
fa1b18c171
@@ -28,7 +28,7 @@
|
||||
int vgpu_tsg_open(struct tsg_gk20a *tsg)
|
||||
{
|
||||
struct tegra_vgpu_cmd_msg msg = {};
|
||||
struct tegra_vgpu_tsg_open_params *p =
|
||||
struct tegra_vgpu_tsg_open_rel_params *p =
|
||||
&msg.params.tsg_open;
|
||||
int err;
|
||||
|
||||
@@ -47,6 +47,26 @@ int vgpu_tsg_open(struct tsg_gk20a *tsg)
|
||||
return err;
|
||||
}
|
||||
|
||||
void vgpu_tsg_release(struct tsg_gk20a *tsg)
|
||||
{
|
||||
struct tegra_vgpu_cmd_msg msg = {};
|
||||
struct tegra_vgpu_tsg_open_rel_params *p =
|
||||
&msg.params.tsg_release;
|
||||
int err;
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
msg.cmd = TEGRA_VGPU_CMD_TSG_RELEASE;
|
||||
msg.handle = vgpu_get_handle(tsg->g);
|
||||
p->tsg_id = tsg->tsgid;
|
||||
err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg));
|
||||
err = err ? err : msg.ret;
|
||||
if (err) {
|
||||
nvgpu_err(tsg->g,
|
||||
"vgpu_tsg_release failed, tsgid %d", tsg->tsgid);
|
||||
}
|
||||
}
|
||||
|
||||
int vgpu_enable_tsg(struct tsg_gk20a *tsg)
|
||||
{
|
||||
struct gk20a *g = tsg->g;
|
||||
|
||||
Reference in New Issue
Block a user