diff options
author | Richard Zhao <rizhao@nvidia.com> | 2017-12-05 18:48:22 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-12-10 13:36:39 -0500 |
commit | fa1b18c171aba0f8bb674ccc8c60ae81213a16f6 (patch) | |
tree | 6c1204b817e052416da00400a713a66d0418cf1b /drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c | |
parent | 7f0aa103eaba5f1ad9c928066c8abe69ef734626 (diff) |
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>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c index c40e6f90..06f52177 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/tsg_vgpu.c | |||
@@ -28,7 +28,7 @@ | |||
28 | int vgpu_tsg_open(struct tsg_gk20a *tsg) | 28 | int vgpu_tsg_open(struct tsg_gk20a *tsg) |
29 | { | 29 | { |
30 | struct tegra_vgpu_cmd_msg msg = {}; | 30 | struct tegra_vgpu_cmd_msg msg = {}; |
31 | struct tegra_vgpu_tsg_open_params *p = | 31 | struct tegra_vgpu_tsg_open_rel_params *p = |
32 | &msg.params.tsg_open; | 32 | &msg.params.tsg_open; |
33 | int err; | 33 | int err; |
34 | 34 | ||
@@ -47,6 +47,26 @@ int vgpu_tsg_open(struct tsg_gk20a *tsg) | |||
47 | return err; | 47 | return err; |
48 | } | 48 | } |
49 | 49 | ||
50 | void vgpu_tsg_release(struct tsg_gk20a *tsg) | ||
51 | { | ||
52 | struct tegra_vgpu_cmd_msg msg = {}; | ||
53 | struct tegra_vgpu_tsg_open_rel_params *p = | ||
54 | &msg.params.tsg_release; | ||
55 | int err; | ||
56 | |||
57 | gk20a_dbg_fn(""); | ||
58 | |||
59 | msg.cmd = TEGRA_VGPU_CMD_TSG_RELEASE; | ||
60 | msg.handle = vgpu_get_handle(tsg->g); | ||
61 | p->tsg_id = tsg->tsgid; | ||
62 | err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); | ||
63 | err = err ? err : msg.ret; | ||
64 | if (err) { | ||
65 | nvgpu_err(tsg->g, | ||
66 | "vgpu_tsg_release failed, tsgid %d", tsg->tsgid); | ||
67 | } | ||
68 | } | ||
69 | |||
50 | int vgpu_enable_tsg(struct tsg_gk20a *tsg) | 70 | int vgpu_enable_tsg(struct tsg_gk20a *tsg) |
51 | { | 71 | { |
52 | struct gk20a *g = tsg->g; | 72 | struct gk20a *g = tsg->g; |