]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
v4l: xilinx: dma: Terminate DMA when stream on fails
authorHyun Kwon <hyun.kwon@xilinx.com>
Fri, 30 Jun 2017 23:39:08 +0000 (16:39 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 3 Jul 2017 11:10:30 +0000 (13:10 +0200)
commite6a50d567ca45d60ca2051b41744f159f476e9e2
tree6cc4d63cab43a71b0875227c709f4b22db571c1f
parenteffe33fe0aa15c2c0efaaad98ac78a00bc198ea7
v4l: xilinx: dma: Terminate DMA when stream on fails

The dma descriptors are submitted in the buffer queue operation,
and if the following stream-on fails, the queued descriptor would
still remain in the dmaengine queue, while pointing to the invalid
resource (released video buffer). Upon next stream on request,
the stale descriptor gets scheduled first and then generate
an exception from invalid resource pointer. This patch makes sure
that there's no remaining resource on stream-on error by calling
dmaengine_terminate_all().

Reported-by: Jeffrey Mouroux <jmouroux@xilinx.com>
Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/media/platform/xilinx/xilinx-dma.c