Skip to content

Commit

Permalink
Merge tag 'dmaengine-fix-4.17-rc6' of git://git.infradead.org/users/v…
Browse files Browse the repository at this point in the history
…koul/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
  • Loading branch information
torvalds committed May 19, 2018
2 parents 423913a + dbad41e commit 0b449a4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4309,7 +4309,7 @@ F: Documentation/driver-api/dma-buf.rst
T: git git://anongit.freedesktop.org/drm/drm-misc

DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
M: Vinod Koul <[email protected]>
M: Vinod Koul <[email protected]>
L: [email protected]
Q: https://patchwork.kernel.org/project/linux-dmaengine/list/
S: Maintained
Expand Down
18 changes: 13 additions & 5 deletions drivers/dma/qcom/bam_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,14 @@ static int bam_alloc_chan(struct dma_chan *chan)
return 0;
}

static int bam_pm_runtime_get_sync(struct device *dev)
{
if (pm_runtime_enabled(dev))
return pm_runtime_get_sync(dev);

return 0;
}

/**
* bam_free_chan - Frees dma resources associated with specific channel
* @chan: specified channel
Expand All @@ -539,7 +547,7 @@ static void bam_free_chan(struct dma_chan *chan)
unsigned long flags;
int ret;

ret = pm_runtime_get_sync(bdev->dev);
ret = bam_pm_runtime_get_sync(bdev->dev);
if (ret < 0)
return;

Expand Down Expand Up @@ -720,7 +728,7 @@ static int bam_pause(struct dma_chan *chan)
unsigned long flag;
int ret;

ret = pm_runtime_get_sync(bdev->dev);
ret = bam_pm_runtime_get_sync(bdev->dev);
if (ret < 0)
return ret;

Expand All @@ -746,7 +754,7 @@ static int bam_resume(struct dma_chan *chan)
unsigned long flag;
int ret;

ret = pm_runtime_get_sync(bdev->dev);
ret = bam_pm_runtime_get_sync(bdev->dev);
if (ret < 0)
return ret;

Expand Down Expand Up @@ -852,7 +860,7 @@ static irqreturn_t bam_dma_irq(int irq, void *data)
if (srcs & P_IRQ)
tasklet_schedule(&bdev->task);

ret = pm_runtime_get_sync(bdev->dev);
ret = bam_pm_runtime_get_sync(bdev->dev);
if (ret < 0)
return ret;

Expand Down Expand Up @@ -969,7 +977,7 @@ static void bam_start_dma(struct bam_chan *bchan)
if (!vd)
return;

ret = pm_runtime_get_sync(bdev->dev);
ret = bam_pm_runtime_get_sync(bdev->dev);
if (ret < 0)
return;

Expand Down

0 comments on commit 0b449a4

Please sign in to comment.