diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 69 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 |
2 files changed, 35 insertions, 35 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 3c69a9d0..893fbf28 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -627,11 +627,8 @@ static void gk20a_remove_support(struct platform_device *dev) | |||
627 | 627 | ||
628 | release_firmware(g->pmu_fw); | 628 | release_firmware(g->pmu_fw); |
629 | 629 | ||
630 | if (g->irq_requested) { | 630 | free_irq(g->irq_stall, g); |
631 | free_irq(g->irq_stall, g); | 631 | free_irq(g->irq_nonstall, g); |
632 | free_irq(g->irq_nonstall, g); | ||
633 | g->irq_requested = false; | ||
634 | } | ||
635 | 632 | ||
636 | /* free mappings to registers, etc*/ | 633 | /* free mappings to registers, etc*/ |
637 | 634 | ||
@@ -667,7 +664,6 @@ static int gk20a_init_support(struct platform_device *dev) | |||
667 | } | 664 | } |
668 | 665 | ||
669 | /* Get interrupt numbers */ | 666 | /* Get interrupt numbers */ |
670 | g->irq_stall = platform_get_irq(dev, 0); | ||
671 | g->irq_nonstall = platform_get_irq(dev, 1); | 667 | g->irq_nonstall = platform_get_irq(dev, 1); |
672 | if (g->irq_stall < 0 || g->irq_nonstall < 0) { | 668 | if (g->irq_stall < 0 || g->irq_nonstall < 0) { |
673 | err = -ENXIO; | 669 | err = -ENXIO; |
@@ -759,11 +755,8 @@ static int gk20a_pm_prepare_poweroff(struct device *_dev) | |||
759 | * After this point, gk20a interrupts should not get | 755 | * After this point, gk20a interrupts should not get |
760 | * serviced. | 756 | * serviced. |
761 | */ | 757 | */ |
762 | if (g->irq_requested) { | 758 | disable_irq(g->irq_stall); |
763 | free_irq(g->irq_stall, g); | 759 | disable_irq(g->irq_nonstall); |
764 | free_irq(g->irq_nonstall, g); | ||
765 | g->irq_requested = false; | ||
766 | } | ||
767 | 760 | ||
768 | /* disable elpg before gr or fifo suspend */ | 761 | /* disable elpg before gr or fifo suspend */ |
769 | ret |= gk20a_pmu_destroy(g); | 762 | ret |= gk20a_pmu_destroy(g); |
@@ -810,29 +803,8 @@ static int gk20a_pm_finalize_poweron(struct device *_dev) | |||
810 | nice_value = task_nice(current); | 803 | nice_value = task_nice(current); |
811 | set_user_nice(current, -20); | 804 | set_user_nice(current, -20); |
812 | 805 | ||
813 | if (!g->irq_requested) { | 806 | enable_irq(g->irq_stall); |
814 | err = request_threaded_irq(g->irq_stall, | 807 | enable_irq(g->irq_nonstall); |
815 | gk20a_intr_isr_stall, | ||
816 | gk20a_intr_thread_stall, | ||
817 | 0, "gk20a_stall", g); | ||
818 | if (err) { | ||
819 | dev_err(dev_from_gk20a(g), | ||
820 | "failed to request stall intr irq @ %lld\n", | ||
821 | (u64)g->irq_stall); | ||
822 | goto done; | ||
823 | } | ||
824 | err = request_threaded_irq(g->irq_nonstall, | ||
825 | gk20a_intr_isr_nonstall, | ||
826 | gk20a_intr_thread_nonstall, | ||
827 | 0, "gk20a_nonstall", g); | ||
828 | if (err) { | ||
829 | dev_err(dev_from_gk20a(g), | ||
830 | "failed to request non-stall intr irq @ %lld\n", | ||
831 | (u64)g->irq_nonstall); | ||
832 | goto done; | ||
833 | } | ||
834 | g->irq_requested = true; | ||
835 | } | ||
836 | 808 | ||
837 | g->power_on = true; | 809 | g->power_on = true; |
838 | 810 | ||
@@ -1346,6 +1318,35 @@ static int gk20a_probe(struct platform_device *dev) | |||
1346 | set_gk20a(dev, gk20a); | 1318 | set_gk20a(dev, gk20a); |
1347 | gk20a->dev = dev; | 1319 | gk20a->dev = dev; |
1348 | 1320 | ||
1321 | gk20a->irq_stall = platform_get_irq(dev, 0); | ||
1322 | gk20a->irq_nonstall = platform_get_irq(dev, 1); | ||
1323 | if (gk20a->irq_stall < 0 || gk20a->irq_nonstall < 0) | ||
1324 | return -ENXIO; | ||
1325 | err = devm_request_threaded_irq(&dev->dev, | ||
1326 | gk20a->irq_stall, | ||
1327 | gk20a_intr_isr_stall, | ||
1328 | gk20a_intr_thread_stall, | ||
1329 | 0, "gk20a_stall", gk20a); | ||
1330 | if (err) { | ||
1331 | dev_err(&dev->dev, | ||
1332 | "failed to request stall intr irq @ %d\n", | ||
1333 | gk20a->irq_stall); | ||
1334 | return err; | ||
1335 | } | ||
1336 | err = devm_request_threaded_irq(&dev->dev, | ||
1337 | gk20a->irq_nonstall, | ||
1338 | gk20a_intr_isr_nonstall, | ||
1339 | gk20a_intr_thread_nonstall, | ||
1340 | 0, "gk20a_nonstall", gk20a); | ||
1341 | if (err) { | ||
1342 | dev_err(&dev->dev, | ||
1343 | "failed to request non-stall intr irq @ %d\n", | ||
1344 | gk20a->irq_nonstall); | ||
1345 | return err; | ||
1346 | } | ||
1347 | disable_irq(gk20a->irq_stall); | ||
1348 | disable_irq(gk20a->irq_nonstall); | ||
1349 | |||
1349 | err = gk20a_user_init(dev); | 1350 | err = gk20a_user_init(dev); |
1350 | if (err) | 1351 | if (err) |
1351 | return err; | 1352 | return err; |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 7aa10692..e071573d 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -217,7 +217,6 @@ struct gk20a { | |||
217 | void __iomem *bar1; | 217 | void __iomem *bar1; |
218 | 218 | ||
219 | bool power_on; | 219 | bool power_on; |
220 | bool irq_requested; | ||
221 | 220 | ||
222 | struct clk_gk20a clk; | 221 | struct clk_gk20a clk; |
223 | struct fifo_gk20a fifo; | 222 | struct fifo_gk20a fifo; |