Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5b4a6895 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Vinod Koul
Browse files

dmaengine: qcom: bam_dma: disable runtime pm on remote controlled



Remotely controlled BAM instance should not do any power management from
CPU side, as cpu can not reliably say if the BAM is busy or not.

Disable it for such instances.

Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 54eb5e26
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -1333,6 +1333,11 @@ static int bam_dma_probe(struct platform_device *pdev)
	if (ret)
	if (ret)
		goto err_unregister_dma;
		goto err_unregister_dma;


	if (bdev->controlled_remotely) {
		pm_runtime_disable(&pdev->dev);
		return 0;
	}

	pm_runtime_irq_safe(&pdev->dev);
	pm_runtime_irq_safe(&pdev->dev);
	pm_runtime_set_autosuspend_delay(&pdev->dev, BAM_DMA_AUTOSUSPEND_DELAY);
	pm_runtime_set_autosuspend_delay(&pdev->dev, BAM_DMA_AUTOSUSPEND_DELAY);
	pm_runtime_use_autosuspend(&pdev->dev);
	pm_runtime_use_autosuspend(&pdev->dev);
@@ -1416,6 +1421,7 @@ static int __maybe_unused bam_dma_suspend(struct device *dev)
{
{
	struct bam_device *bdev = dev_get_drvdata(dev);
	struct bam_device *bdev = dev_get_drvdata(dev);


	if (!bdev->controlled_remotely)
		pm_runtime_force_suspend(dev);
		pm_runtime_force_suspend(dev);


	clk_unprepare(bdev->bamclk);
	clk_unprepare(bdev->bamclk);
@@ -1432,6 +1438,7 @@ static int __maybe_unused bam_dma_resume(struct device *dev)
	if (ret)
	if (ret)
		return ret;
		return ret;


	if (!bdev->controlled_remotely)
		pm_runtime_force_resume(dev);
		pm_runtime_force_resume(dev);


	return 0;
	return 0;