media: rockchip: vicap fixes error of destroy dummy buffer

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I25180eaeedb72c5b75c348ac65810e0d93c49c5e
This commit is contained in:
Zefa Chen
2024-09-24 18:05:07 +08:00
committed by Tao Huang
parent 9ae0cc05fa
commit 6a37cd10c6

View File

@@ -6916,6 +6916,8 @@ void rkcif_do_stop_stream(struct rkcif_stream *stream,
break;
}
}
if (can_reset && hw_dev->dummy_buf.vaddr)
rkcif_destroy_dummy_buf(stream);
mutex_unlock(&hw_dev->dev_lock);
if (dev->can_be_reset && dev->chip_id >= CHIP_RK3588_CIF) {
rkcif_do_soft_reset(dev);
@@ -6938,8 +6940,6 @@ void rkcif_do_stop_stream(struct rkcif_stream *stream,
}
if (atomic_read(&dev->pipe.stream_cnt) == 0)
atomic_set(&stream->sub_stream_buf_cnt, 0);
if (can_reset && hw_dev->dummy_buf.vaddr)
rkcif_destroy_dummy_buf(stream);
stream->rounding_bit = 0;
if (stream->id == RKCIF_STREAM_MIPI_ID0 && dev->is_support_get_exp) {
kfifo_free(&stream->exp_kfifo);