OSDN Git Service

dmaengine: dw: Initialize channel before each transfer
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sun, 5 Jul 2020 11:56:20 +0000 (14:56 +0300)
committerVinod Koul <vkoul@kernel.org>
Mon, 6 Jul 2020 04:51:05 +0000 (10:21 +0530)
commit99ba8b9b0d9780e9937eb1d488d120e9e5c2533d
tree1a5f69b6e0cf89684386d41f83d0bbc2104e4ec7
parente3122822a74033ba8d6d9af855078f9ab741e33f
dmaengine: dw: Initialize channel before each transfer

In some cases DMA can be used only with a consumer which does runtime power
management and on the platforms, that have DMA auto power gating logic
(see comments in the drivers/acpi/acpi_lpss.c), may result in DMA losing
its context. Simple mitigation of this issue is to initialize channel
each time the consumer initiates a transfer.

Fixes: cfdf5b6cc598 ("dw_dmac: add support for Lynxpoint DMA controllers")
Reported-by: Tsuchiya Yuto <kitakar@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206403
Link: https://lore.kernel.org/r/20200705115620.51929-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/dw/core.c