From ebe034ab016b6958bd201993c046e77208c1474d Mon Sep 17 00:00:00 2001 From: "mason.huo" Date: Tue, 16 Aug 2022 10:13:10 +0800 Subject: [PATCH] media: starfive: Deprecated the itir & itiw output lines As the itir & itiw isp lines are just for internal debugging, and isp team don't need them to debug issue. Deprecated the two output lines from v4l2 driver. Signed-off-by: mason.huo --- drivers/media/platform/starfive/v4l2_driver/stf_video.c | 2 +- drivers/media/platform/starfive/v4l2_driver/stf_vin.c | 5 +++++ drivers/media/platform/starfive/v4l2_driver/stfcamss.c | 2 ++ drivers/media/platform/starfive/v4l2_driver/stfcamss.h | 2 ++ 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/starfive/v4l2_driver/stf_video.c b/drivers/media/platform/starfive/v4l2_driver/stf_video.c index 1f03df8..7a634e9 100644 --- a/drivers/media/platform/starfive/v4l2_driver/stf_video.c +++ b/drivers/media/platform/starfive/v4l2_driver/stf_video.c @@ -1827,7 +1827,7 @@ int stf_video_register(struct stfcamss_video *video, //strlcpy(vdev->name, name, sizeof(vdev->name)); strscpy(vdev->name, name, sizeof(vdev->name)); - ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1); + ret = video_register_device(vdev, VFL_TYPE_VIDEO, video->id); if (ret < 0) { st_err(ST_VIDEO, "Failed to register video device: %d\n", diff --git a/drivers/media/platform/starfive/v4l2_driver/stf_vin.c b/drivers/media/platform/starfive/v4l2_driver/stf_vin.c index 524e19a..64031ae 100644 --- a/drivers/media/platform/starfive/v4l2_driver/stf_vin.c +++ b/drivers/media/platform/starfive/v4l2_driver/stf_vin.c @@ -1373,6 +1373,11 @@ int stf_vin_register(struct stf_vin2_dev *vin_dev, struct v4l2_device *v4l2_dev) char *sub_name = get_line_subdevname(i); int is_mp; +#ifdef STF_CAMSS_SKIP_ITI + if ((stf_vin_map_isp_line(i) == STF_ISP_LINE_SRC_ITIW) || + (stf_vin_map_isp_line(i) == STF_ISP_LINE_SRC_ITIR)) + continue; +#endif is_mp = (stf_vin_map_isp_line(i) == STF_ISP_LINE_SRC) ? true : false; is_mp = false; sd = &vin_dev->line[i].subdev; diff --git a/drivers/media/platform/starfive/v4l2_driver/stfcamss.c b/drivers/media/platform/starfive/v4l2_driver/stfcamss.c index 66a40d2..63f0d8e 100644 --- a/drivers/media/platform/starfive/v4l2_driver/stfcamss.c +++ b/drivers/media/platform/starfive/v4l2_driver/stfcamss.c @@ -450,6 +450,7 @@ static int stfcamss_register_subdevices(struct stfcamss *stfcamss) goto err_link; } +#ifndef STF_CAMSS_SKIP_ITI ret = media_create_pad_link( &isp_dev->subdev.entity, STF_ISP_PAD_SRC_ITIW, @@ -481,6 +482,7 @@ static int stfcamss_register_subdevices(struct stfcamss *stfcamss) ret); goto err_link; } +#endif ret = media_create_pad_link( &isp_dev->subdev.entity, diff --git a/drivers/media/platform/starfive/v4l2_driver/stfcamss.h b/drivers/media/platform/starfive/v4l2_driver/stfcamss.h index cd4fb31..186c03b 100644 --- a/drivers/media/platform/starfive/v4l2_driver/stfcamss.h +++ b/drivers/media/platform/starfive/v4l2_driver/stfcamss.h @@ -32,6 +32,8 @@ enum subdev_type { #define STF_PAD_SRC 1 #define STF_PADS_NUM 2 +#define STF_CAMSS_SKIP_ITI + enum port_num { DVP_SENSOR_PORT_NUMBER = 0, CSI2RX_SENSOR_PORT_NUMBER -- 2.7.4