summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
diff options
context:
space:
mode:
authorDebarshi Dutta <ddutta@nvidia.com>2018-11-27 00:35:56 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2019-02-11 11:18:36 -0500
commitef9de9e9925573b691d78760e42334ad24c5797f (patch)
tree068bc5b4bb01de77136ed1da0e5da10d883c164a /drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
parent5b8ecbc51fe2e94a233c2c42d497b05c2eccdaf5 (diff)
gpu: nvgpu: replace input parameter tsgid with pointer to struct tsg_gk20a
gv11b_fifo_preempt_tsg needs to access the runlist_id of the tsg as well as pass the tsg pointer to other public functions such as gk20a_fifo_disable_tsg_sched. This qualifies the preempt_tsg to use a pointer to a struct tsg_gk20a instead of just using the tsgid. Jira NVGPU-1461 Change-Id: I01fbd2370b5746c2a597a0351e0301b0f7d25175 Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1959068 (cherry picked from commit 1e78d47f15ff050edbb10a88550012178d353288 in rel-32) Reviewed-on: https://git-master.nvidia.com/r/2013725 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bibek Basu <bbasu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/fifo_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/fifo_vgpu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
index 8821e799..9e3f7867 100644
--- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
@@ -471,7 +471,7 @@ int vgpu_fifo_preempt_channel(struct gk20a *g, u32 chid)
471 return err; 471 return err;
472} 472}
473 473
474int vgpu_fifo_preempt_tsg(struct gk20a *g, u32 tsgid) 474int vgpu_fifo_preempt_tsg(struct gk20a *g, struct tsg_gk20a *tsg)
475{ 475{
476 struct tegra_vgpu_cmd_msg msg; 476 struct tegra_vgpu_cmd_msg msg;
477 struct tegra_vgpu_tsg_preempt_params *p = 477 struct tegra_vgpu_tsg_preempt_params *p =
@@ -482,13 +482,13 @@ int vgpu_fifo_preempt_tsg(struct gk20a *g, u32 tsgid)
482 482
483 msg.cmd = TEGRA_VGPU_CMD_TSG_PREEMPT; 483 msg.cmd = TEGRA_VGPU_CMD_TSG_PREEMPT;
484 msg.handle = vgpu_get_handle(g); 484 msg.handle = vgpu_get_handle(g);
485 p->tsg_id = tsgid; 485 p->tsg_id = tsg->tsgid;
486 err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg)); 486 err = vgpu_comm_sendrecv(&msg, sizeof(msg), sizeof(msg));
487 err = err ? err : msg.ret; 487 err = err ? err : msg.ret;
488 488
489 if (err) { 489 if (err) {
490 nvgpu_err(g, 490 nvgpu_err(g,
491 "preempt tsg %u failed", tsgid); 491 "preempt tsg %u failed", tsg->tsgid);
492 } 492 }
493 493
494 return err; 494 return err;