diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index d07918b0..e995dcbf 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -697,12 +697,6 @@ static irqreturn_t gk20a_intr_thread_stall(int irq, void *dev_id) | |||
697 | return g->ops.mc.isr_thread_stall(g); | 697 | return g->ops.mc.isr_thread_stall(g); |
698 | } | 698 | } |
699 | 699 | ||
700 | static irqreturn_t gk20a_intr_thread_nonstall(int irq, void *dev_id) | ||
701 | { | ||
702 | struct gk20a *g = dev_id; | ||
703 | return g->ops.mc.isr_thread_nonstall(g); | ||
704 | } | ||
705 | |||
706 | void gk20a_remove_support(struct device *dev) | 700 | void gk20a_remove_support(struct device *dev) |
707 | { | 701 | { |
708 | struct gk20a *g = get_gk20a(dev); | 702 | struct gk20a *g = get_gk20a(dev); |
@@ -717,6 +711,12 @@ void gk20a_remove_support(struct device *dev) | |||
717 | 711 | ||
718 | gk20a_channel_cancel_pending_sema_waits(g); | 712 | gk20a_channel_cancel_pending_sema_waits(g); |
719 | 713 | ||
714 | if (g->nonstall_work_queue) { | ||
715 | cancel_work_sync(&g->nonstall_fn_work); | ||
716 | destroy_workqueue(g->nonstall_work_queue); | ||
717 | g->nonstall_work_queue = NULL; | ||
718 | } | ||
719 | |||
720 | if (g->pmu.remove_support) | 720 | if (g->pmu.remove_support) |
721 | g->pmu.remove_support(&g->pmu); | 721 | g->pmu.remove_support(&g->pmu); |
722 | 722 | ||
@@ -932,6 +932,13 @@ int gk20a_pm_finalize_poweron(struct device *dev) | |||
932 | if (g->ops.clk.disable_slowboot) | 932 | if (g->ops.clk.disable_slowboot) |
933 | g->ops.clk.disable_slowboot(g); | 933 | g->ops.clk.disable_slowboot(g); |
934 | 934 | ||
935 | /* Enable interrupt workqueue */ | ||
936 | if (!g->nonstall_work_queue) { | ||
937 | g->nonstall_work_queue = alloc_workqueue("%s", | ||
938 | WQ_HIGHPRI, 1, "mc_nonstall"); | ||
939 | INIT_WORK(&g->nonstall_fn_work, g->ops.mc.isr_nonstall_cb); | ||
940 | } | ||
941 | |||
935 | gk20a_enable_priv_ring(g); | 942 | gk20a_enable_priv_ring(g); |
936 | 943 | ||
937 | /* TBD: move this after graphics init in which blcg/slcg is enabled. | 944 | /* TBD: move this after graphics init in which blcg/slcg is enabled. |
@@ -1617,10 +1624,9 @@ static int gk20a_probe(struct platform_device *dev) | |||
1617 | gk20a->irq_stall); | 1624 | gk20a->irq_stall); |
1618 | return err; | 1625 | return err; |
1619 | } | 1626 | } |
1620 | err = devm_request_threaded_irq(&dev->dev, | 1627 | err = devm_request_irq(&dev->dev, |
1621 | gk20a->irq_nonstall, | 1628 | gk20a->irq_nonstall, |
1622 | gk20a_intr_isr_nonstall, | 1629 | gk20a_intr_isr_nonstall, |
1623 | gk20a_intr_thread_nonstall, | ||
1624 | 0, "gk20a_nonstall", gk20a); | 1630 | 0, "gk20a_nonstall", gk20a); |
1625 | if (err) { | 1631 | if (err) { |
1626 | dev_err(&dev->dev, | 1632 | dev_err(&dev->dev, |