dmaengine: qcom_hidma: correct API violation for submit
authorSinan Kaya <okaya@codeaurora.org>
Fri, 30 Jun 2017 14:43:05 +0000 (10:43 -0400)
committerVinod Koul <vinod.koul@intel.com>
Mon, 3 Jul 2017 05:09:51 +0000 (10:39 +0530)
commit99efdb3e48fb2fa84addb3102946d3eca341192b
tree5d9d7116af71e62aeff4a8e2d52d4b1f88376395
parent82474dade7f4c60206609e7274591d159db105bf
dmaengine: qcom_hidma: correct API violation for submit

Current code is violating the DMA Engine API by putting the submitted
requests directly into the HW queue. This causes queued transactions
to be started by another thread as soon as the first one finishes.

The DMA Engine document clearly states this.

"dmaengine_submit() will not start the DMA operation".

Move HW queuing of the requests into the issue_pending() routine
to comply with API requirements also create a new queued state for
temporarily holding the requests.

A descriptor goes through these transitions now.

free->prepared->queued->active->completed->free

as opposed to

free->prepared->active->completed->free

Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/qcom/hidma.c
drivers/dma/qcom/hidma.h