diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-06-09 12:46:06 -0400 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-06-09 14:20:28 -0400 |
commit | 3daeac112bee905632f0a07efdca2e532ef34da7 (patch) | |
tree | cfaf7562c83a2ce13547f018e45c8f8a9f5cad7b /drivers/gpu | |
parent | e3162262e35e4d100ee92492150769eb7d4b03c2 (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
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 41 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 |
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 | |||
545 | static irqreturn_t gk20a_intr_isr_stall(int irq, void *dev_id) | 545 | static 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 | ||
559 | static irqreturn_t gk20a_intr_isr_nonstall(int irq, void *dev_id) | 552 | static 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 | ||
573 | void gk20a_pbus_isr(struct gk20a *g) | 559 | void gk20a_pbus_isr(struct gk20a *g) |
@@ -607,27 +593,13 @@ void gk20a_pbus_isr(struct gk20a *g) | |||
607 | static irqreturn_t gk20a_intr_thread_stall(int irq, void *dev_id) | 593 | static 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 | ||
620 | static irqreturn_t gk20a_intr_thread_nonstall(int irq, void *dev_id) | 599 | static 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 | ||
633 | void gk20a_remove_support(struct device *dev) | 605 | void 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 | ||
1873 | void gk20a_idle_nosuspend(struct device *dev) | ||
1874 | { | ||
1875 | pm_runtime_put_noidle(dev); | ||
1876 | } | ||
1877 | |||
1878 | void gk20a_idle(struct device *dev) | 1845 | void 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 | ||
1062 | void gk20a_busy_noresume(struct device *dev); | 1062 | void gk20a_busy_noresume(struct device *dev); |
1063 | int __must_check gk20a_busy(struct device *dev); | 1063 | int __must_check gk20a_busy(struct device *dev); |
1064 | void gk20a_idle_nosuspend(struct device *dev); | ||
1065 | void gk20a_idle(struct device *dev); | 1064 | void gk20a_idle(struct device *dev); |
1066 | void gk20a_disable(struct gk20a *g, u32 units); | 1065 | void gk20a_disable(struct gk20a *g, u32 units); |
1067 | void gk20a_enable(struct gk20a *g, u32 units); | 1066 | void gk20a_enable(struct gk20a *g, u32 units); |