diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-19 12:54:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-05-19 12:54:02 -0400 |
commit | 0b449a441dac919444face9e3b6ca6aaec30791d (patch) | |
tree | 34e73a4f46c465c1c6408df681a4c8e08942ef9c | |
parent | 423913ad4ae5b3e8fb8983f70969fb522261ba26 (diff) | |
parent | dbad41e7bb5f4b9949ff5ea1d76c20711f326308 (diff) |
Merge tag 'dmaengine-fix-4.17-rc6' of git://git.infradead.org/users/vkoul/slave-dma
Pull dmaengine fix from Vinod Koul:
- qcom bam runtime_pm fix
- email update for Vinod
* tag 'dmaengine-fix-4.17-rc6' of git://git.infradead.org/users/vkoul/slave-dma:
dmaengine: qcom: bam_dma: check if the runtime pm enabled
dmaengine: Update email address for Vinod
-rw-r--r-- | MAINTAINERS | 2 | ||||
-rw-r--r-- | drivers/dma/qcom/bam_dma.c | 18 |
2 files changed, 14 insertions, 6 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index d155d1e0dbc2..078fd80f664f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -4309,7 +4309,7 @@ F: Documentation/driver-api/dma-buf.rst | |||
4309 | T: git git://anongit.freedesktop.org/drm/drm-misc | 4309 | T: git git://anongit.freedesktop.org/drm/drm-misc |
4310 | 4310 | ||
4311 | DMA GENERIC OFFLOAD ENGINE SUBSYSTEM | 4311 | DMA GENERIC OFFLOAD ENGINE SUBSYSTEM |
4312 | M: Vinod Koul <vinod.koul@intel.com> | 4312 | M: Vinod Koul <vkoul@kernel.org> |
4313 | L: dmaengine@vger.kernel.org | 4313 | L: dmaengine@vger.kernel.org |
4314 | Q: https://patchwork.kernel.org/project/linux-dmaengine/list/ | 4314 | Q: https://patchwork.kernel.org/project/linux-dmaengine/list/ |
4315 | S: Maintained | 4315 | S: Maintained |
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c index d29275b97e84..4a828c18099a 100644 --- a/drivers/dma/qcom/bam_dma.c +++ b/drivers/dma/qcom/bam_dma.c | |||
@@ -524,6 +524,14 @@ static int bam_alloc_chan(struct dma_chan *chan) | |||
524 | return 0; | 524 | return 0; |
525 | } | 525 | } |
526 | 526 | ||
527 | static int bam_pm_runtime_get_sync(struct device *dev) | ||
528 | { | ||
529 | if (pm_runtime_enabled(dev)) | ||
530 | return pm_runtime_get_sync(dev); | ||
531 | |||
532 | return 0; | ||
533 | } | ||
534 | |||
527 | /** | 535 | /** |
528 | * bam_free_chan - Frees dma resources associated with specific channel | 536 | * bam_free_chan - Frees dma resources associated with specific channel |
529 | * @chan: specified channel | 537 | * @chan: specified channel |
@@ -539,7 +547,7 @@ static void bam_free_chan(struct dma_chan *chan) | |||
539 | unsigned long flags; | 547 | unsigned long flags; |
540 | int ret; | 548 | int ret; |
541 | 549 | ||
542 | ret = pm_runtime_get_sync(bdev->dev); | 550 | ret = bam_pm_runtime_get_sync(bdev->dev); |
543 | if (ret < 0) | 551 | if (ret < 0) |
544 | return; | 552 | return; |
545 | 553 | ||
@@ -720,7 +728,7 @@ static int bam_pause(struct dma_chan *chan) | |||
720 | unsigned long flag; | 728 | unsigned long flag; |
721 | int ret; | 729 | int ret; |
722 | 730 | ||
723 | ret = pm_runtime_get_sync(bdev->dev); | 731 | ret = bam_pm_runtime_get_sync(bdev->dev); |
724 | if (ret < 0) | 732 | if (ret < 0) |
725 | return ret; | 733 | return ret; |
726 | 734 | ||
@@ -746,7 +754,7 @@ static int bam_resume(struct dma_chan *chan) | |||
746 | unsigned long flag; | 754 | unsigned long flag; |
747 | int ret; | 755 | int ret; |
748 | 756 | ||
749 | ret = pm_runtime_get_sync(bdev->dev); | 757 | ret = bam_pm_runtime_get_sync(bdev->dev); |
750 | if (ret < 0) | 758 | if (ret < 0) |
751 | return ret; | 759 | return ret; |
752 | 760 | ||
@@ -852,7 +860,7 @@ static irqreturn_t bam_dma_irq(int irq, void *data) | |||
852 | if (srcs & P_IRQ) | 860 | if (srcs & P_IRQ) |
853 | tasklet_schedule(&bdev->task); | 861 | tasklet_schedule(&bdev->task); |
854 | 862 | ||
855 | ret = pm_runtime_get_sync(bdev->dev); | 863 | ret = bam_pm_runtime_get_sync(bdev->dev); |
856 | if (ret < 0) | 864 | if (ret < 0) |
857 | return ret; | 865 | return ret; |
858 | 866 | ||
@@ -969,7 +977,7 @@ static void bam_start_dma(struct bam_chan *bchan) | |||
969 | if (!vd) | 977 | if (!vd) |
970 | return; | 978 | return; |
971 | 979 | ||
972 | ret = pm_runtime_get_sync(bdev->dev); | 980 | ret = bam_pm_runtime_get_sync(bdev->dev); |
973 | if (ret < 0) | 981 | if (ret < 0) |
974 | return; | 982 | return; |
975 | 983 | ||