From 1543e317f1da31b75942316931e8f491a8920811 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Thu, 04 Jan 2024 10:08:02 +0000
Subject: [PATCH] disable FB
---
kernel/drivers/media/platform/rockchip/isp/isp_stats_v32.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/kernel/drivers/media/platform/rockchip/isp/isp_stats_v32.c b/kernel/drivers/media/platform/rockchip/isp/isp_stats_v32.c
index cd0a490..6e73379 100644
--- a/kernel/drivers/media/platform/rockchip/isp/isp_stats_v32.c
+++ b/kernel/drivers/media/platform/rockchip/isp/isp_stats_v32.c
@@ -468,7 +468,7 @@
struct rkisp_isp_params_val_v32 *priv_val;
struct rkisp_dummy_buffer *buf;
int idx, buf_fd = -1;
- u32 reg = 0, ctrl;
+ u32 reg = 0, ctrl, mask;
priv_val = (struct rkisp_isp_params_val_v32 *)dev->params_vdev.priv_val;
if (!priv_val->buf_info_owner && priv_val->buf_info_idx >= 0) {
@@ -481,9 +481,11 @@
if (priv_val->buf_info_owner == RKISP_INFO2DRR_OWNER_GAIN) {
reg = ISP3X_GAIN_CTRL;
ctrl = ISP3X_GAIN_2DDR_EN;
+ mask = ISP3X_GAIN_2DDR_EN;
} else {
reg = ISP3X_RAWAWB_CTRL;
ctrl = ISP32_RAWAWB_2DDR_PATH_EN;
+ mask = ISP32_RAWAWB_2DDR_PATH_EN | ISP32_RAWAWB_2DDR_PATH_DS;
}
idx = priv_val->buf_info_idx;
@@ -510,6 +512,12 @@
} else if (reg == ISP3X_RAWAWB_CTRL &&
rkisp_read(dev, reg, true) & ISP32_RAWAWB_2DDR_PATH_ERR) {
v4l2_warn(&dev->v4l2_dev, "rawawb2ddr path error idx:%d\n", idx);
+ } else {
+ u32 v0 = rkisp_read(dev, reg, false);
+ u32 v1 = rkisp_read_reg_cache(dev, reg);
+
+ if ((v0 & mask) != (v1 & mask))
+ rkisp_write(dev, reg, v0 | (v1 & mask), false);
}
if (buf_fd == -1)
@@ -627,6 +635,9 @@
ops->get_dhaz_stats(stats_vdev, cur_stat_buf);
ops->get_vsm_stats(stats_vdev, cur_stat_buf);
}
+
+ if (cur_stat_buf && stats_vdev->dev->is_first_double)
+ cur_stat_buf->meas_type |= ISP32_STAT_RTT_FST;
if (is_dummy) {
spin_lock_irqsave(&stats_vdev->rd_lock, flags);
@@ -1035,7 +1046,7 @@
work.frame_id = cur_frame_id;
work.isp_ris = temp_isp_ris | isp_ris;
work.isp3a_ris = temp_isp3a_ris;
- work.timestamp = ktime_get_ns();
+ work.timestamp = rkisp_time_get_ns(stats_vdev->dev);
rkisp_stats_send_meas_v32(stats_vdev, &work);
}
--
Gitblit v1.6.2