diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 28 |
2 files changed, 20 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 64a14f8e..b1d9fa55 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -2772,9 +2772,9 @@ int gk20a_channel_suspend(struct gk20a *g) | |||
2772 | if (gk20a_channel_get(ch)) { | 2772 | if (gk20a_channel_get(ch)) { |
2773 | gk20a_dbg_info("suspend channel %d", chid); | 2773 | gk20a_dbg_info("suspend channel %d", chid); |
2774 | /* disable channel */ | 2774 | /* disable channel */ |
2775 | g->ops.fifo.disable_channel(ch); | 2775 | gk20a_disable_channel_tsg(g, ch); |
2776 | /* preempt the channel */ | 2776 | /* preempt the channel */ |
2777 | g->ops.fifo.preempt_channel(g, chid); | 2777 | gk20a_fifo_preempt(g, ch); |
2778 | gk20a_channel_cancel_job_clean_up(ch, true); | 2778 | gk20a_channel_cancel_job_clean_up(ch, true); |
2779 | /* wait for channel update notifiers */ | 2779 | /* wait for channel update notifiers */ |
2780 | if (ch->update_fn) | 2780 | if (ch->update_fn) |
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 2d88ac53..7e0bd7ce 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -764,12 +764,15 @@ static int gr_gk20a_ctx_zcull_setup(struct gk20a *g, struct channel_gk20a *c) | |||
764 | va_hi = u64_hi32(ch_ctx->zcull_ctx.gpu_va); | 764 | va_hi = u64_hi32(ch_ctx->zcull_ctx.gpu_va); |
765 | va = ((va_lo >> 8) & 0x00FFFFFF) | ((va_hi << 24) & 0xFF000000); | 765 | va = ((va_lo >> 8) & 0x00FFFFFF) | ((va_hi << 24) & 0xFF000000); |
766 | 766 | ||
767 | c->g->ops.fifo.disable_channel(c); | 767 | ret = gk20a_disable_channel_tsg(g, c); |
768 | ret = c->g->ops.fifo.preempt_channel(c->g, c->hw_chid); | ||
769 | if (ret) { | 768 | if (ret) { |
770 | c->g->ops.fifo.enable_channel(c); | 769 | gk20a_err(dev_from_gk20a(g), "failed to disable channel/TSG\n"); |
771 | gk20a_err(dev_from_gk20a(g), | 770 | goto clean_up; |
772 | "failed to disable gr engine activity\n"); | 771 | } |
772 | ret = gk20a_fifo_preempt(g, c); | ||
773 | if (ret) { | ||
774 | gk20a_enable_channel_tsg(g, c); | ||
775 | gk20a_err(dev_from_gk20a(g), "failed to preempt channel/TSG\n"); | ||
773 | goto clean_up; | 776 | goto clean_up; |
774 | } | 777 | } |
775 | 778 | ||
@@ -780,7 +783,7 @@ static int gr_gk20a_ctx_zcull_setup(struct gk20a *g, struct channel_gk20a *c) | |||
780 | gk20a_mem_wr(g, mem, | 783 | gk20a_mem_wr(g, mem, |
781 | ctxsw_prog_main_image_zcull_ptr_o(), va); | 784 | ctxsw_prog_main_image_zcull_ptr_o(), va); |
782 | 785 | ||
783 | c->g->ops.fifo.enable_channel(c); | 786 | gk20a_enable_channel_tsg(g, c); |
784 | 787 | ||
785 | clean_up: | 788 | clean_up: |
786 | gk20a_mem_end(g, mem); | 789 | gk20a_mem_end(g, mem); |
@@ -1617,10 +1620,15 @@ int gr_gk20a_update_smpc_ctxsw_mode(struct gk20a *g, | |||
1617 | 1620 | ||
1618 | mem = &ch_ctx->gr_ctx->mem; | 1621 | mem = &ch_ctx->gr_ctx->mem; |
1619 | 1622 | ||
1620 | c->g->ops.fifo.disable_channel(c); | 1623 | ret = gk20a_disable_channel_tsg(g, c); |
1621 | ret = c->g->ops.fifo.preempt_channel(c->g, c->hw_chid); | ||
1622 | if (ret) { | 1624 | if (ret) { |
1623 | gk20a_err(dev_from_gk20a(g), "failed to preempt channel"); | 1625 | gk20a_err(dev_from_gk20a(g), "failed to disable channel/TSG\n"); |
1626 | goto out; | ||
1627 | } | ||
1628 | ret = gk20a_fifo_preempt(g, c); | ||
1629 | if (ret) { | ||
1630 | gk20a_enable_channel_tsg(g, c); | ||
1631 | gk20a_err(dev_from_gk20a(g), "failed to preempt channel/TSG\n"); | ||
1624 | goto out; | 1632 | goto out; |
1625 | } | 1633 | } |
1626 | 1634 | ||
@@ -1646,7 +1654,7 @@ int gr_gk20a_update_smpc_ctxsw_mode(struct gk20a *g, | |||
1646 | gk20a_mem_end(g, mem); | 1654 | gk20a_mem_end(g, mem); |
1647 | 1655 | ||
1648 | out: | 1656 | out: |
1649 | c->g->ops.fifo.enable_channel(c); | 1657 | gk20a_enable_channel_tsg(g, c); |
1650 | return ret; | 1658 | return ret; |
1651 | } | 1659 | } |
1652 | 1660 | ||