mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
media: rockchip: vicap fixes error of proc info
Change-Id: I335d4b8c140864ffb9143005b77adc9b635052f1 Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
This commit is contained in:
@@ -11976,6 +11976,7 @@ static void rkcif_update_stream(struct rkcif_device *cif_dev,
|
||||
mipi_id);
|
||||
if (ret && cif_dev->chip_id < CHIP_RK3588_CIF)
|
||||
return;
|
||||
stream->last_frame_idx = stream->frame_idx;
|
||||
} else {
|
||||
ret = rkcif_update_new_buffer_wake_up_mode(stream);
|
||||
if (ret && cif_dev->chip_id < CHIP_RK3588_CIF)
|
||||
@@ -13608,6 +13609,12 @@ static void rkcif_toisp_check_stop_status(struct sditf_priv *priv,
|
||||
stream->stopping = false;
|
||||
wake_up(&stream->wq_stopped);
|
||||
}
|
||||
if (!(stream->cur_stream_mode & RKCIF_STREAM_MODE_CAPTURE)) {
|
||||
cur_time = rkcif_time_get_ns(stream->cifdev);
|
||||
stream->readout.total_time = cur_time - stream->readout.fe_timestamp;
|
||||
stream->readout.readout_time = cur_time - stream->readout.fs_timestamp;
|
||||
stream->readout.fe_timestamp = cur_time;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&stream->cifdev->stream_spinlock, flags);
|
||||
if (stream->is_wait_stop_complete) {
|
||||
@@ -13753,9 +13760,6 @@ static void rkcif_toisp_check_stop_status(struct sditf_priv *priv,
|
||||
(priv->hdr_cfg.hdr_mode == HDR_X2 && stream->id == 1) ||
|
||||
(priv->hdr_cfg.hdr_mode == HDR_X3 && stream->id == 2)))
|
||||
sditf_disable_immediately(priv);
|
||||
cur_time = rkcif_time_get_ns(stream->cifdev);
|
||||
stream->readout.total_time = cur_time - stream->readout.fs_timestamp;
|
||||
stream->readout.fs_timestamp = cur_time;
|
||||
stream->buf_wake_up_cnt++;
|
||||
if (stream->frame_idx % 2)
|
||||
stream->fps_stats.frm0_timestamp = rkcif_time_get_ns(stream->cifdev);
|
||||
|
||||
@@ -538,6 +538,7 @@ static void rkcif_show_format(struct rkcif_device *dev, struct seq_file *f)
|
||||
u64 fps, timestamp0, timestamp1;
|
||||
unsigned long flags;
|
||||
u32 time_val = 0;
|
||||
u32 remainder = 0;
|
||||
|
||||
if (atomic_read(&pipe->stream_cnt) < 1)
|
||||
return;
|
||||
@@ -586,7 +587,7 @@ static void rkcif_show_format(struct rkcif_device *dev, struct seq_file *f)
|
||||
else
|
||||
fps = timestamp0 > timestamp1 ?
|
||||
timestamp0 - timestamp1 : timestamp1 - timestamp0;
|
||||
fps = div_u64(fps, 1000000);
|
||||
fps = div_u64(fps, 1000);
|
||||
|
||||
seq_puts(f, "Output Info:\n");
|
||||
seq_printf(f, "\tformat:%s/%ux%u(%u,%u)\n",
|
||||
@@ -596,28 +597,27 @@ static void rkcif_show_format(struct rkcif_device *dev, struct seq_file *f)
|
||||
seq_printf(f, "\tcompact:%s\n", stream->is_compact ? "enable" : "disabled");
|
||||
seq_printf(f, "\tframe amount:%d\n", stream->frame_idx - 1);
|
||||
if (dev->inf_id == RKCIF_MIPI_LVDS) {
|
||||
time_val = div_u64(stream->readout.early_time, 1000000);
|
||||
seq_printf(f, "\tearly:%u ms\n", time_val);
|
||||
time_val = div_u64(stream->readout.early_time, 1000);
|
||||
time_val = div_u64_rem(time_val, 1000, &remainder);
|
||||
seq_printf(f, "\tearly:%u.%u ms\n", time_val, remainder);
|
||||
if (dev->hdr.hdr_mode == NO_HDR ||
|
||||
dev->hdr.hdr_mode == HDR_COMPR) {
|
||||
time_val = div_u64(stream->readout.readout_time, 1000000);
|
||||
if (dev->sditf[0] && dev->sditf[0]->mode.rdbk_mode < RKISP_VICAP_RDBK_AIQ)
|
||||
seq_puts(f, "\tsingle readout:N/A\n");
|
||||
else
|
||||
seq_printf(f, "\tsingle readout:%u ms\n", time_val);
|
||||
time_val = div_u64(stream->readout.readout_time, 1000);
|
||||
time_val = div_u64_rem(time_val, 1000, &remainder);
|
||||
seq_printf(f, "\tsingle readout:%u.%u ms\n", time_val, remainder);
|
||||
} else {
|
||||
time_val = div_u64(stream->readout.readout_time, 1000000);
|
||||
if (dev->sditf[0] && dev->sditf[0]->mode.rdbk_mode < RKISP_VICAP_RDBK_AIQ)
|
||||
seq_puts(f, "\tsingle readout:N/A\n");
|
||||
else
|
||||
seq_printf(f, "\tsingle readout:%u ms\n", time_val);
|
||||
time_val = div_u64(stream->readout.total_time, 1000000);
|
||||
seq_printf(f, "\ttotal readout:%u ms\n", time_val);
|
||||
time_val = div_u64(stream->readout.readout_time, 1000);
|
||||
time_val = div_u64_rem(time_val, 1000, &remainder);
|
||||
seq_printf(f, "\tsingle readout:%u.%u ms\n", time_val, remainder);
|
||||
time_val = div_u64(stream->readout.total_time, 1000);
|
||||
time_val = div_u64_rem(time_val, 1000, &remainder);
|
||||
seq_printf(f, "\ttotal readout:%u.%u ms\n", time_val, remainder);
|
||||
|
||||
}
|
||||
}
|
||||
seq_printf(f, "\trate:%llu ms\n", fps);
|
||||
fps = div_u64(1000, fps);
|
||||
time_val = div_u64_rem(fps, 1000, &remainder);
|
||||
seq_printf(f, "\trate:%u.%u ms\n", time_val, remainder);
|
||||
fps = div_u64(1000000, fps);
|
||||
seq_printf(f, "\tfps:%llu\n", fps);
|
||||
seq_puts(f, "\tirq statistics:\n");
|
||||
seq_printf(f, "\t\t\ttotal:%llu\n",
|
||||
|
||||
Reference in New Issue
Block a user