mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
media: rockchip: isp: rdbk_auto mode stop to clean buf list
Change-Id: Ia38e77ae5086bf54ee48fe54a60600e320fb34aa Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -563,7 +563,7 @@ int rkisp_csi_config_patch(struct rkisp_device *dev)
|
||||
|
||||
if (dev->isp_inp == INP_CIF && dev->isp_ver > ISP_V21) {
|
||||
/* read back mode default if more sensor link to isp */
|
||||
if (dev->hw_dev->dev_link_num > 1)
|
||||
if (!dev->hw_dev->is_single)
|
||||
dev->is_rdbk_auto = true;
|
||||
mode.rdbk_mode = dev->is_rdbk_auto ? RKISP_VICAP_RDBK_AUTO : RKISP_VICAP_ONLINE;
|
||||
} else {
|
||||
|
||||
@@ -970,8 +970,8 @@ static int isp_show(struct seq_file *p, void *v)
|
||||
struct rkisp_stream *stream;
|
||||
u32 val = 0;
|
||||
|
||||
seq_printf(p, "%-10s Version:v%02x.%02x.%02x\n",
|
||||
dev->name,
|
||||
seq_printf(p, "%-10s ISP:0x%x Version:v%02x.%02x.%02x\n",
|
||||
dev->name, dev->isp_ver,
|
||||
RKISP_DRIVER_VERSION >> 16,
|
||||
(RKISP_DRIVER_VERSION & 0xff00) >> 8,
|
||||
RKISP_DRIVER_VERSION & 0x00ff);
|
||||
@@ -988,12 +988,13 @@ static int isp_show(struct seq_file *p, void *v)
|
||||
|
||||
if (sensor && sensor->fi.interval.numerator)
|
||||
val = sensor->fi.interval.denominator / sensor->fi.interval.numerator;
|
||||
seq_printf(p, "%-10s %s Format:%s Size:%dx%d@%dfps Offset(%d,%d)\n",
|
||||
seq_printf(p, "%-10s %s Format:%s Size:%dx%d@%dfps Offset(%d,%d) Inp:0x%x\n",
|
||||
"Input",
|
||||
sensor ? sensor->sd->name : NULL,
|
||||
sdev->in_fmt.name,
|
||||
sdev->in_crop.width, sdev->in_crop.height, val,
|
||||
sdev->in_crop.left, sdev->in_crop.top);
|
||||
sdev->in_crop.left, sdev->in_crop.top,
|
||||
dev->isp_inp);
|
||||
|
||||
if (!(dev->isp_state & ISP_START))
|
||||
return 0;
|
||||
@@ -1002,7 +1003,7 @@ static int isp_show(struct seq_file *p, void *v)
|
||||
stream = &dev->dmarx_dev.stream[RKISP_STREAM_RAWRD2];
|
||||
seq_printf(p, "%-10s mode:frame%d (frame:%d rate:%dms state:%s time:%dms frameloss:%d)"
|
||||
" cnt(total:%d X1:%d X2:%d X3:%d) rd_bufcnt:%d\n",
|
||||
"Isp Read",
|
||||
"Isp offline",
|
||||
dev->rd_mode - 3,
|
||||
dev->dmarx_dev.cur_frame.id,
|
||||
(u32)(dev->dmarx_dev.cur_frame.timestamp - dev->dmarx_dev.pre_frame.timestamp) / 1000 / 1000,
|
||||
|
||||
@@ -3098,8 +3098,26 @@ static int rkisp_rx_qbuf(struct rkisp_device *dev,
|
||||
void rkisp_rx_buf_pool_free(struct rkisp_device *dev)
|
||||
{
|
||||
struct rkisp_rx_buf_pool *pool;
|
||||
struct rkisp_stream *stream;
|
||||
struct rkisp_buffer *buf;
|
||||
unsigned long lock_flags = 0;
|
||||
int i;
|
||||
|
||||
if (dev->is_rdbk_auto) {
|
||||
for (i = RKISP_STREAM_RAWRD0; i <= RKISP_STREAM_RAWRD2; i++) {
|
||||
stream = &dev->dmarx_dev.stream[i];
|
||||
if (stream->id != i)
|
||||
continue;
|
||||
spin_lock_irqsave(&stream->vbq_lock, lock_flags);
|
||||
while (!list_empty(&stream->buf_queue)) {
|
||||
buf = list_first_entry(&stream->buf_queue,
|
||||
struct rkisp_buffer, queue);
|
||||
list_del(&buf->queue);
|
||||
}
|
||||
stream->curr_buf = NULL;
|
||||
spin_unlock_irqrestore(&stream->vbq_lock, lock_flags);
|
||||
}
|
||||
}
|
||||
for (i = 0; i < RKISP_RX_BUF_POOL_MAX; i++) {
|
||||
pool = &dev->pv_pool[i];
|
||||
if (!pool->dbufs)
|
||||
|
||||
Reference in New Issue
Block a user