mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
media: rockchip: isp: add stats log for isp21 and isp30
Change-Id: I5562b78ce87d4773c08ffbe85f4e0bef351344da Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This commit is contained in:
@@ -949,7 +949,6 @@ rkisp_stats_send_meas_v21(struct rkisp_isp_stats_vdev *stats_vdev,
|
||||
struct rkisp_stats_v21_ops *ops =
|
||||
(struct rkisp_stats_v21_ops *)stats_vdev->priv_ops;
|
||||
struct rkisp_isp_params_vdev *params_vdev = &stats_vdev->dev->params_vdev;
|
||||
int ret = 0;
|
||||
|
||||
cur_frame_id = meas_work->frame_id;
|
||||
spin_lock(&stats_vdev->rd_lock);
|
||||
@@ -979,10 +978,10 @@ rkisp_stats_send_meas_v21(struct rkisp_isp_stats_vdev *stats_vdev,
|
||||
"ISP2X_AFM_LUM_OF\n");
|
||||
|
||||
if (meas_work->isp3a_ris & ISP2X_3A_RAWAWB)
|
||||
ret |= ops->get_rawawb_meas(stats_vdev, cur_stat_buf);
|
||||
ops->get_rawawb_meas(stats_vdev, cur_stat_buf);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP2X_3A_RAWAF)
|
||||
ret |= ops->get_rawaf_meas(stats_vdev, cur_stat_buf);
|
||||
ops->get_rawaf_meas(stats_vdev, cur_stat_buf);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP2X_3A_RAWAF_SUM)
|
||||
v4l2_warn(stats_vdev->vnode.vdev.v4l2_dev,
|
||||
@@ -993,37 +992,42 @@ rkisp_stats_send_meas_v21(struct rkisp_isp_stats_vdev *stats_vdev,
|
||||
"ISP2X_3A_RAWAF_LUM\n");
|
||||
|
||||
if (meas_work->isp3a_ris & ISP2X_3A_RAWAE_BIG)
|
||||
ret |= ops->get_rawae3_meas(stats_vdev, cur_stat_buf);
|
||||
ops->get_rawae3_meas(stats_vdev, cur_stat_buf);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP2X_3A_RAWHIST_BIG)
|
||||
ret |= ops->get_rawhst3_meas(stats_vdev, cur_stat_buf);
|
||||
ops->get_rawhst3_meas(stats_vdev, cur_stat_buf);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP2X_3A_RAWAE_CH0)
|
||||
ret |= ops->get_rawae0_meas(stats_vdev, cur_stat_buf);
|
||||
ops->get_rawae0_meas(stats_vdev, cur_stat_buf);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP2X_3A_RAWAE_CH1)
|
||||
ret |= ops->get_rawae1_meas(stats_vdev, cur_stat_buf);
|
||||
ops->get_rawae1_meas(stats_vdev, cur_stat_buf);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP2X_3A_RAWAE_CH2)
|
||||
ret |= ops->get_rawae2_meas(stats_vdev, cur_stat_buf);
|
||||
ops->get_rawae2_meas(stats_vdev, cur_stat_buf);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP2X_3A_RAWHIST_CH0)
|
||||
ret |= ops->get_rawhst0_meas(stats_vdev, cur_stat_buf);
|
||||
ops->get_rawhst0_meas(stats_vdev, cur_stat_buf);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP2X_3A_RAWHIST_CH1)
|
||||
ret |= ops->get_rawhst1_meas(stats_vdev, cur_stat_buf);
|
||||
ops->get_rawhst1_meas(stats_vdev, cur_stat_buf);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP2X_3A_RAWHIST_CH2)
|
||||
ret |= ops->get_rawhst2_meas(stats_vdev, cur_stat_buf);
|
||||
ops->get_rawhst2_meas(stats_vdev, cur_stat_buf);
|
||||
|
||||
if (meas_work->isp_ris & ISP2X_FRAME) {
|
||||
ret |= ops->get_bls_stats(stats_vdev, cur_stat_buf);
|
||||
ret |= ops->get_dhaz_stats(stats_vdev, cur_stat_buf);
|
||||
ops->get_bls_stats(stats_vdev, cur_stat_buf);
|
||||
ops->get_dhaz_stats(stats_vdev, cur_stat_buf);
|
||||
}
|
||||
|
||||
rkisp_stats_restart_meas(stats_vdev);
|
||||
|
||||
if (cur_buf && !ret) {
|
||||
v4l2_dbg(4, rkisp_debug, &stats_vdev->dev->v4l2_dev,
|
||||
"%s id:%d seq:%d params_id:%d ris:0x%x buf:%p meas_type:0x%x\n",
|
||||
__func__, stats_vdev->dev->unite_index,
|
||||
cur_frame_id, params_vdev->cur_frame_id, meas_work->isp3a_ris,
|
||||
cur_buf, !cur_stat_buf ? 0 : cur_stat_buf->meas_type);
|
||||
if (cur_buf) {
|
||||
vb2_set_plane_payload(&cur_buf->vb.vb2_buf, 0,
|
||||
sizeof(struct rkisp_isp2x_stat_buffer));
|
||||
cur_buf->vb.sequence = cur_frame_id;
|
||||
|
||||
@@ -965,7 +965,6 @@ rkisp_stats_send_meas_v3x(struct rkisp_isp_stats_vdev *stats_vdev,
|
||||
struct rkisp_stats_ops_v3x *ops =
|
||||
(struct rkisp_stats_ops_v3x *)stats_vdev->priv_ops;
|
||||
struct rkisp_isp_params_vdev *params_vdev = &stats_vdev->dev->params_vdev;
|
||||
int ret = 0;
|
||||
u32 size = sizeof(struct rkisp3x_isp_stat_buffer);
|
||||
|
||||
cur_frame_id = meas_work->frame_id;
|
||||
@@ -1001,35 +1000,35 @@ rkisp_stats_send_meas_v3x(struct rkisp_isp_stats_vdev *stats_vdev,
|
||||
|
||||
ops->get_rawaf_meas(stats_vdev, cur_stat_buf, 0);
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWAWB)
|
||||
ret |= ops->get_rawawb_meas(stats_vdev, cur_stat_buf, 0);
|
||||
ops->get_rawawb_meas(stats_vdev, cur_stat_buf, 0);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWAE_BIG)
|
||||
ret |= ops->get_rawae3_meas(stats_vdev, cur_stat_buf, 0);
|
||||
ops->get_rawae3_meas(stats_vdev, cur_stat_buf, 0);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWHIST_BIG)
|
||||
ret |= ops->get_rawhst3_meas(stats_vdev, cur_stat_buf, 0);
|
||||
ops->get_rawhst3_meas(stats_vdev, cur_stat_buf, 0);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWAE_CH0)
|
||||
ret |= ops->get_rawae0_meas(stats_vdev, cur_stat_buf, 0);
|
||||
ops->get_rawae0_meas(stats_vdev, cur_stat_buf, 0);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWAE_CH1)
|
||||
ret |= ops->get_rawae1_meas(stats_vdev, cur_stat_buf, 0);
|
||||
ops->get_rawae1_meas(stats_vdev, cur_stat_buf, 0);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWAE_CH2)
|
||||
ret |= ops->get_rawae2_meas(stats_vdev, cur_stat_buf, 0);
|
||||
ops->get_rawae2_meas(stats_vdev, cur_stat_buf, 0);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWHIST_CH0)
|
||||
ret |= ops->get_rawhst0_meas(stats_vdev, cur_stat_buf, 0);
|
||||
ops->get_rawhst0_meas(stats_vdev, cur_stat_buf, 0);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWHIST_CH1)
|
||||
ret |= ops->get_rawhst1_meas(stats_vdev, cur_stat_buf, 0);
|
||||
ops->get_rawhst1_meas(stats_vdev, cur_stat_buf, 0);
|
||||
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWHIST_CH2)
|
||||
ret |= ops->get_rawhst2_meas(stats_vdev, cur_stat_buf, 0);
|
||||
ops->get_rawhst2_meas(stats_vdev, cur_stat_buf, 0);
|
||||
|
||||
if (meas_work->isp_ris & ISP3X_FRAME) {
|
||||
ret |= ops->get_bls_stats(stats_vdev, cur_stat_buf, 0);
|
||||
ret |= ops->get_dhaz_stats(stats_vdev, cur_stat_buf, 0);
|
||||
ops->get_bls_stats(stats_vdev, cur_stat_buf, 0);
|
||||
ops->get_dhaz_stats(stats_vdev, cur_stat_buf, 0);
|
||||
}
|
||||
|
||||
if (stats_vdev->dev->hw_dev->unite) {
|
||||
@@ -1040,30 +1039,34 @@ rkisp_stats_send_meas_v3x(struct rkisp_isp_stats_vdev *stats_vdev,
|
||||
}
|
||||
ops->get_rawaf_meas(stats_vdev, cur_stat_buf, 1);
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWAWB)
|
||||
ret |= ops->get_rawawb_meas(stats_vdev, cur_stat_buf, 1);
|
||||
ops->get_rawawb_meas(stats_vdev, cur_stat_buf, 1);
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWAE_BIG)
|
||||
ret |= ops->get_rawae3_meas(stats_vdev, cur_stat_buf, 1);
|
||||
ops->get_rawae3_meas(stats_vdev, cur_stat_buf, 1);
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWHIST_BIG)
|
||||
ret |= ops->get_rawhst3_meas(stats_vdev, cur_stat_buf, 1);
|
||||
ops->get_rawhst3_meas(stats_vdev, cur_stat_buf, 1);
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWAE_CH0)
|
||||
ret |= ops->get_rawae0_meas(stats_vdev, cur_stat_buf, 1);
|
||||
ops->get_rawae0_meas(stats_vdev, cur_stat_buf, 1);
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWAE_CH1)
|
||||
ret |= ops->get_rawae1_meas(stats_vdev, cur_stat_buf, 1);
|
||||
ops->get_rawae1_meas(stats_vdev, cur_stat_buf, 1);
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWAE_CH2)
|
||||
ret |= ops->get_rawae2_meas(stats_vdev, cur_stat_buf, 1);
|
||||
ops->get_rawae2_meas(stats_vdev, cur_stat_buf, 1);
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWHIST_CH0)
|
||||
ret |= ops->get_rawhst0_meas(stats_vdev, cur_stat_buf, 1);
|
||||
ops->get_rawhst0_meas(stats_vdev, cur_stat_buf, 1);
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWHIST_CH1)
|
||||
ret |= ops->get_rawhst1_meas(stats_vdev, cur_stat_buf, 1);
|
||||
ops->get_rawhst1_meas(stats_vdev, cur_stat_buf, 1);
|
||||
if (meas_work->isp3a_ris & ISP3X_3A_RAWHIST_CH2)
|
||||
ret |= ops->get_rawhst2_meas(stats_vdev, cur_stat_buf, 1);
|
||||
ops->get_rawhst2_meas(stats_vdev, cur_stat_buf, 1);
|
||||
if (meas_work->isp_ris & ISP3X_FRAME) {
|
||||
ret |= ops->get_bls_stats(stats_vdev, cur_stat_buf, 1);
|
||||
ret |= ops->get_dhaz_stats(stats_vdev, cur_stat_buf, 1);
|
||||
ops->get_bls_stats(stats_vdev, cur_stat_buf, 1);
|
||||
ops->get_dhaz_stats(stats_vdev, cur_stat_buf, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (cur_buf && !ret) {
|
||||
v4l2_dbg(4, rkisp_debug, &stats_vdev->dev->v4l2_dev,
|
||||
"%s id:%d seq:%d params_id:%d ris:0x%x buf:%p meas_type:0x%x\n",
|
||||
__func__, stats_vdev->dev->unite_index,
|
||||
cur_frame_id, params_vdev->cur_frame_id, meas_work->isp3a_ris,
|
||||
cur_buf, !cur_stat_buf ? 0 : cur_stat_buf->meas_type);
|
||||
if (cur_buf) {
|
||||
vb2_set_plane_payload(&cur_buf->vb.vb2_buf, 0, size);
|
||||
cur_buf->vb.sequence = cur_frame_id;
|
||||
cur_buf->vb.vb2_buf.timestamp = meas_work->timestamp;
|
||||
|
||||
Reference in New Issue
Block a user