summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
diff options
context:
space:
mode:
authorsujeet baranwal <sbaranwal@nvidia.com>2014-09-30 13:54:57 -0400
committerDan Willemsen <dwillemsen@nvidia.com>2015-03-18 15:11:57 -0400
commit5febd08ae76cbd4042e53ad70f062cd491b7e8b6 (patch)
tree3815d03eaab78e1d249a8fafeec32a312ddc9de7 /drivers/gpu/nvgpu/gk20a/channel_gk20a.c
parent3d313d06570dcb28bba73247a2c0fc52bec56af0 (diff)
gpu: kernel support for suspending/resuming SMs
Kernel support for allowing a GPU debugger to suspend and resume SMs. Invocation of "suspend" on a given channel will suspend all SMs if the channel is resident, else remove the channel form the runlist. Similarly, "resume" will either resume all SMs if the channel was resident, or re-enable the channel in the runlist. Change-Id: I3b4ae21dc1b91c1059c828ec6db8125f8a0ce194 Signed-off-by: sujeet baranwal <sbaranwal@nvidia.com> Signed-off-by: Mayank Kaushik <mkaushik@nvidia.com> Reviewed-on: http://git-master/r/552115 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index 9f2e0017..f554cf77 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -396,6 +396,14 @@ static int channel_gk20a_update_runlist(struct channel_gk20a *c, bool add)
396 return c->g->ops.fifo.update_runlist(c->g, 0, c->hw_chid, add, true); 396 return c->g->ops.fifo.update_runlist(c->g, 0, c->hw_chid, add, true);
397} 397}
398 398
399void channel_gk20a_enable(struct channel_gk20a *ch)
400{
401 /* enable channel */
402 gk20a_writel(ch->g, ccsr_channel_r(ch->hw_chid),
403 gk20a_readl(ch->g, ccsr_channel_r(ch->hw_chid)) |
404 ccsr_channel_enable_set_true_f());
405}
406
399void channel_gk20a_disable(struct channel_gk20a *ch) 407void channel_gk20a_disable(struct channel_gk20a *ch)
400{ 408{
401 /* disable channel */ 409 /* disable channel */