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/common.c | 26 +++++++++++++++++++++++++-
1 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/kernel/drivers/media/platform/rockchip/isp/common.c b/kernel/drivers/media/platform/rockchip/isp/common.c
index 875d6da..80536de 100644
--- a/kernel/drivers/media/platform/rockchip/isp/common.c
+++ b/kernel/drivers/media/platform/rockchip/isp/common.c
@@ -6,6 +6,7 @@
#include <linux/of_platform.h>
#include <linux/slab.h>
#include "dev.h"
+#include "hw.h"
#include "isp_ispp.h"
#include "regs.h"
@@ -36,6 +37,8 @@
*flag = SW_REG_CACHE;
if (dev->hw_dev->is_single || is_direct) {
*flag = SW_REG_CACHE_SYNC;
+ if (dev->hw_dev->unite == ISP_UNITE_ONE)
+ return;
writel(val, dev->hw_dev->base_next_addr + reg);
}
}
@@ -166,13 +169,18 @@
continue;
}
+ if (hw->unite == ISP_UNITE_ONE && dev->unite_index == ISP_UNITE_RIGHT) {
+ val = dev->sw_base_addr + i + RKISP_ISP_SW_MAX_SIZE;
+ flag = dev->sw_base_addr + i + RKISP_ISP_SW_MAX_SIZE + RKISP_ISP_SW_REG_SIZE;
+ }
+
if (*flag == SW_REG_CACHE) {
if ((i == ISP3X_MAIN_RESIZE_CTRL ||
i == ISP32_BP_RESIZE_CTRL ||
i == ISP3X_SELF_RESIZE_CTRL) && *val == 0)
*val = CIF_RSZ_CTRL_CFG_UPD;
writel(*val, base + i);
- if (hw->is_unite) {
+ if (hw->unite == ISP_UNITE_TWO) {
val = dev->sw_base_addr + i + RKISP_ISP_SW_MAX_SIZE;
if ((i == ISP3X_MAIN_RESIZE_CTRL ||
i == ISP32_BP_RESIZE_CTRL ||
@@ -310,6 +318,11 @@
return -EINVAL;
}
+ if (hw->dev_num >= DEV_MAX) {
+ dev_err(isp->dev, "failed attach isp hw, max dev:%d\n", DEV_MAX);
+ return -EINVAL;
+ }
+
isp->dev_id = hw->dev_num;
hw->isp[hw->dev_num] = isp;
hw->dev_num++;
@@ -443,3 +456,14 @@
else
rkisp_free_buffer(dev, &hw->dummy_buf);
}
+
+u64 rkisp_time_get_ns(struct rkisp_device *dev)
+{
+ u64 ns;
+
+ if (dev->isp_ver == ISP_V32)
+ ns = ktime_get_boottime_ns();
+ else
+ ns = ktime_get_ns();
+ return ns;
+}
--
Gitblit v1.6.2