summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-06-09 12:46:06 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-06-09 14:20:28 -0400
commit3daeac112bee905632f0a07efdca2e532ef34da7 (patch)
treecfaf7562c83a2ce13547f018e45c8f8a9f5cad7b
parente3162262e35e4d100ee92492150769eb7d4b03c2 (diff)
Revert "gpu: nvgpu: take power refcount in ISR"
This reverts commit 2219f38727ffa17291e15c1898bd3e65f43d09fd. It leaves GPU in on state for some tests that require powering down GPU. Change-Id: I79d44fed729e98692021c57bbeff6a0ef2e8c983 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1161846
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c41
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h1
2 files changed, 4 insertions, 38 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 714b494f..d21d0527 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -545,29 +545,15 @@ int gk20a_sim_esc_read(struct gk20a *g, char *path, u32 index, u32 count, u32 *d
545static irqreturn_t gk20a_intr_isr_stall(int irq, void *dev_id) 545static irqreturn_t gk20a_intr_isr_stall(int irq, void *dev_id)
546{ 546{
547 struct gk20a *g = dev_id; 547 struct gk20a *g = dev_id;
548 irqreturn_t ret;
549 548
550 ret = g->ops.mc.isr_stall(g); 549 return g->ops.mc.isr_stall(g);
551 if (ret == IRQ_WAKE_THREAD) {
552 /* balanced in gk20a_intr_thread_stall() */
553 gk20a_busy_noresume(g->dev);
554 }
555
556 return ret;
557} 550}
558 551
559static irqreturn_t gk20a_intr_isr_nonstall(int irq, void *dev_id) 552static irqreturn_t gk20a_intr_isr_nonstall(int irq, void *dev_id)
560{ 553{
561 struct gk20a *g = dev_id; 554 struct gk20a *g = dev_id;
562 irqreturn_t ret;
563
564 ret = g->ops.mc.isr_nonstall(g);
565 if (ret == IRQ_WAKE_THREAD) {
566 /* balanced in gk20a_intr_thread_nonstall() */
567 gk20a_busy_noresume(g->dev);
568 }
569 555
570 return ret; 556 return g->ops.mc.isr_nonstall(g);
571} 557}
572 558
573void gk20a_pbus_isr(struct gk20a *g) 559void gk20a_pbus_isr(struct gk20a *g)
@@ -607,27 +593,13 @@ void gk20a_pbus_isr(struct gk20a *g)
607static irqreturn_t gk20a_intr_thread_stall(int irq, void *dev_id) 593static irqreturn_t gk20a_intr_thread_stall(int irq, void *dev_id)
608{ 594{
609 struct gk20a *g = dev_id; 595 struct gk20a *g = dev_id;
610 irqreturn_t ret; 596 return g->ops.mc.isr_thread_stall(g);
611
612 ret = g->ops.mc.isr_thread_stall(g);
613
614 /* refcount taken in gk20a_intr_isr_stall() */
615 gk20a_idle_nosuspend(g->dev);
616
617 return ret;
618} 597}
619 598
620static irqreturn_t gk20a_intr_thread_nonstall(int irq, void *dev_id) 599static irqreturn_t gk20a_intr_thread_nonstall(int irq, void *dev_id)
621{ 600{
622 struct gk20a *g = dev_id; 601 struct gk20a *g = dev_id;
623 irqreturn_t ret; 602 return g->ops.mc.isr_thread_nonstall(g);
624
625 ret = g->ops.mc.isr_thread_nonstall(g);
626
627 /* refcount taken in gk20a_intr_isr_nonstall() */
628 gk20a_idle_nosuspend(g->dev);
629
630 return ret;
631} 603}
632 604
633void gk20a_remove_support(struct device *dev) 605void gk20a_remove_support(struct device *dev)
@@ -1870,11 +1842,6 @@ fail:
1870 return ret < 0 ? ret : 0; 1842 return ret < 0 ? ret : 0;
1871} 1843}
1872 1844
1873void gk20a_idle_nosuspend(struct device *dev)
1874{
1875 pm_runtime_put_noidle(dev);
1876}
1877
1878void gk20a_idle(struct device *dev) 1845void gk20a_idle(struct device *dev)
1879{ 1846{
1880#ifdef CONFIG_PM 1847#ifdef CONFIG_PM
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 6622dad0..1c129743 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -1061,7 +1061,6 @@ void gk20a_remove_sysfs(struct device *dev);
1061 1061
1062void gk20a_busy_noresume(struct device *dev); 1062void gk20a_busy_noresume(struct device *dev);
1063int __must_check gk20a_busy(struct device *dev); 1063int __must_check gk20a_busy(struct device *dev);
1064void gk20a_idle_nosuspend(struct device *dev);
1065void gk20a_idle(struct device *dev); 1064void gk20a_idle(struct device *dev);
1066void gk20a_disable(struct gk20a *g, u32 units); 1065void gk20a_disable(struct gk20a *g, u32 units);
1067void gk20a_enable(struct gk20a *g, u32 units); 1066void gk20a_enable(struct gk20a *g, u32 units);