media: rockchip: vicap disable dma capture in fs intr before stop stream

if disable dma capture in fe intr, register write to device may delay after real fs,
the register need effect in next real fs, may cause iommu error or size error

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I451c18f175e89c5ddf7c8a31f2f288dd8c01a8f1
This commit is contained in:
Zefa Chen
2022-11-09 16:56:25 +08:00
parent 3196fead2c
commit bbc9d3fcf6

View File

@@ -9071,8 +9071,7 @@ void rkcif_irq_pingpong_v1(struct rkcif_device *cif_dev)
cif_dev->sditf[0]->mode.rdbk_mode)
stream->buf_wake_up_cnt++;
if (stream->stopping &&
!(stream->cur_stream_mode & RKCIF_STREAM_MODE_TOISP)) {
if (stream->stopping && (!stream->dma_en)) {
rkcif_stream_stop(stream);
stream->stopping = false;
wake_up(&stream->wq_stopped);
@@ -9181,6 +9180,12 @@ void rkcif_irq_pingpong_v1(struct rkcif_device *cif_dev)
spin_unlock_irqrestore(&stream->fps_lock, flags);
}
stream->is_in_vblank = false;
if (stream->stopping && stream->dma_en) {
if (stream->dma_en & RKCIF_DMAEN_BY_VICAP)
stream->to_stop_dma = RKCIF_DMAEN_BY_VICAP;
else if (stream->dma_en & RKCIF_DMAEN_BY_ISP)
stream->to_stop_dma = RKCIF_DMAEN_BY_ISP;
}
if (stream->to_stop_dma) {
ret = rkcif_stop_dma_capture(stream);
if (!ret)