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/isp1/rkisp1.c | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/kernel/drivers/media/platform/rockchip/isp1/rkisp1.c b/kernel/drivers/media/platform/rockchip/isp1/rkisp1.c
index f96fa83..12f5f90 100644
--- a/kernel/drivers/media/platform/rockchip/isp1/rkisp1.c
+++ b/kernel/drivers/media/platform/rockchip/isp1/rkisp1.c
@@ -155,10 +155,15 @@
return -ENODEV;
sensor = sd_to_sensor(dev, sensor_sd);
- ret = v4l2_subdev_call(sensor->sd, video, g_mbus_config,
- &sensor->mbus);
+ if (!sensor)
+ return -ENODEV;
+
+ ret = v4l2_subdev_call(sensor->sd, pad, get_mbus_config,
+ 0, &sensor->mbus);
if (ret && ret != -ENOIOCTLCMD)
return ret;
+
+ sensor->fmt.pad = 0;
sensor->fmt.which = V4L2_SUBDEV_FORMAT_ACTIVE;
ret = v4l2_subdev_call(sensor->sd, pad, get_fmt,
&sensor->cfg, &sensor->fmt);
@@ -327,7 +332,8 @@
acq_prop = CIF_ISP_ACQ_PROP_DMA_RGB;
} else if (in_fmt->fmt_type == FMT_YUV) {
acq_mult = 2;
- if (sensor && sensor->mbus.type == V4L2_MBUS_CSI2) {
+ if (sensor && (sensor->mbus.type == V4L2_MBUS_CSI2_DPHY ||
+ sensor->mbus.type == V4L2_MBUS_CCP2)) {
isp_ctrl = CIF_ISP_CTRL_ISP_MODE_ITU601;
} else {
if (sensor && sensor->mbus.type == V4L2_MBUS_BT656)
@@ -595,7 +601,7 @@
ret = rkisp1_config_dvp(dev);
dpcl |= CIF_VI_DPCL_IF_SEL_PARALLEL;
dev->isp_inp = INP_DVP;
- } else if (sensor && sensor->mbus.type == V4L2_MBUS_CSI2) {
+ } else if (sensor && sensor->mbus.type == V4L2_MBUS_CSI2_DPHY) {
ret = rkisp1_config_mipi(dev);
dpcl |= CIF_VI_DPCL_IF_SEL_MIPI;
dev->isp_inp = INP_CSI;
@@ -822,7 +828,7 @@
dev->stream[RKISP1_STREAM_MP].streaming);
/* Activate MIPI */
- if (sensor && sensor->mbus.type == V4L2_MBUS_CSI2) {
+ if (sensor && sensor->mbus.type == V4L2_MBUS_CSI2_DPHY) {
#if RKISP1_RK3326_USE_OLDMIPI
if (dev->isp_ver == ISP_V13) {
#else
@@ -1250,6 +1256,8 @@
const struct ispsd_in_fmt *in_fmt;
in_fmt = find_in_fmt(mf->code);
+ if (!in_fmt)
+ goto err;
isp_sd->in_fmt = *in_fmt;
isp_sd->in_frm = *mf;
} else if (fmt->pad == RKISP1_ISP_PAD_SOURCE_PATH) {
@@ -1257,6 +1265,8 @@
/* Ignore width/height */
out_fmt = find_out_fmt(mf->code);
+ if (!out_fmt)
+ goto err;
isp_sd->out_fmt = *out_fmt;
/*
* It is quantization for output,
@@ -1763,7 +1773,7 @@
if (isp_mis & CIF_ISP_V_START) {
if (dev->stream[RKISP1_STREAM_SP].interlaced) {
/* 0 = ODD 1 = EVEN */
- if (dev->active_sensor->mbus.type == V4L2_MBUS_CSI2) {
+ if (dev->active_sensor->mbus.type == V4L2_MBUS_CSI2_DPHY) {
void __iomem *addr = NULL;
if (dev->isp_ver == ISP_V10 ||
--
Gitblit v1.6.2