From 2f7c68cb55ecb7331f2381deb497c27155f32faf Mon Sep 17 00:00:00 2001 From: hc <hc@nodka.com> Date: Wed, 03 Jan 2024 09:43:39 +0000 Subject: [PATCH] update kernel to 5.10.198 --- kernel/drivers/media/platform/rockchip/isp/csi.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/drivers/media/platform/rockchip/isp/csi.c b/kernel/drivers/media/platform/rockchip/isp/csi.c index a747d67..efa3714 100644 --- a/kernel/drivers/media/platform/rockchip/isp/csi.c +++ b/kernel/drivers/media/platform/rockchip/isp/csi.c @@ -15,7 +15,7 @@ #include "isp_external.h" #include "regs.h" -static void get_remote_mipi_sensor(struct rkisp_device *dev, +void rkisp_get_remote_mipi_sensor(struct rkisp_device *dev, struct v4l2_subdev **sensor_sd, u32 function) { struct media_graph graph; @@ -82,6 +82,8 @@ id = local->index - 1; if (id && id < RKISP_STREAM_DMATX3) stream = &csi->ispdev->cap_dev.stream[id + 1]; + if (id >= ARRAY_SIZE(csi->sink)) + return -EINVAL; if (flags & MEDIA_LNK_FL_ENABLED) { if (csi->sink[id].linked) { ret = -EBUSY; @@ -210,7 +212,7 @@ emd_vc = 0xFF; emd_dt = 0; dev->hdr.sensor = NULL; - get_remote_mipi_sensor(dev, &mipi_sensor, MEDIA_ENT_F_CAM_SENSOR); + rkisp_get_remote_mipi_sensor(dev, &mipi_sensor, MEDIA_ENT_F_CAM_SENSOR); if (mipi_sensor) { ctrl = v4l2_ctrl_find(mipi_sensor->ctrl_handler, CIFISP_CID_EMB_VC); @@ -546,7 +548,7 @@ } return 0; } - get_remote_mipi_sensor(dev, &sd, type); + rkisp_get_remote_mipi_sensor(dev, &sd, type); if (!sd) { v4l2_err(&dev->v4l2_dev, "%s don't find subdev\n", __func__); return -EINVAL; @@ -577,7 +579,7 @@ memset(&mode, 0, sizeof(mode)); mode.name = dev->name; - get_remote_mipi_sensor(dev, &mipi_sensor, MEDIA_ENT_F_PROC_VIDEO_COMPOSER); + rkisp_get_remote_mipi_sensor(dev, &mipi_sensor, MEDIA_ENT_F_PROC_VIDEO_COMPOSER); if (!mipi_sensor) return -EINVAL; dev->hdr.op_mode = HDR_NORMAL; -- Gitblit v1.6.2