Skip to contentSkip to conversation

media: atomisp: Remove depth-mode and continuous mode support

PATCH In review Hans de Goede 5 participants 22 messages Feb 21, 2023 – Apr 2, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover media: atomisp: Remove depth-mode and continuous mode support

Hi All,

This is the first step of the removal of special/obscure features discussed here:

https://lore.kernel.org/linux-media/[email protected]/

Plus some follow-up patches removing some dead code (some new dead code as well as some pre-existing dead code).

Regards,

Hans

Hans de Goede (10):
media: atomisp: Remove depth-mode support
media: atomisp: Remove continuous mode support
media: atomisp: Remove delayed_init related code
media: atomisp: Remove crop_needs_override from atomisp_set_fmt()
media: atomisp: Remove atomisp_css_enable_raw_binning()
media: atomisp: Remove atomisp_get_metadata_type()
media: atomisp: Remove unused SOC_CAMERA, XENON_FLASH and FILE_INPUT
subdev types
media: atomisp: Remove ATOMISP_USE_YUVPP()
media: atomisp: Remove yuvpp_mode
media: atomisp: Remove online_process setting

 .../media/atomisp/include/linux/atomisp.h     |  26 -
 .../atomisp/include/linux/atomisp_platform.h  |   9 +-
 .../staging/media/atomisp/pci/atomisp_cmd.c   | 744 ++----------------
 .../staging/media/atomisp/pci/atomisp_cmd.h   |   9 -
 .../media/atomisp/pci/atomisp_compat.h        |   7 -
 .../media/atomisp/pci/atomisp_compat_css20.c  | 321 +-------
 .../staging/media/atomisp/pci/atomisp_fops.c  | 110 +--
 .../media/atomisp/pci/atomisp_internal.h      |  21 -
 .../staging/media/atomisp/pci/atomisp_ioctl.c | 162 +---
 .../staging/media/atomisp/pci/atomisp_ioctl.h |   3 -
 .../media/atomisp/pci/atomisp_subdev.c        |  78 +-
 .../media/atomisp/pci/atomisp_subdev.h        |  16 -
 .../staging/media/atomisp/pci/atomisp_v4l2.c  |  35 +-
 13 files changed, 129 insertions(+), 1412 deletions(-)
Signature · 1 line
2.39.1
#1 lore raw

PATCH 1/10 media: atomisp: Remove depth-mode support

Remove support for depth mode. This is a special mode where 2 streams (from 2 different sensors) can be setup and then starting/stopping 1 will automatically also start/stop the other.

Like many of these special features I'm pretty sure that if the queue setup is not done exactly right things will crash and there is no error checking for this.

This seems to be for stereoscopic vision and the only known hw which actually supports this is the Intel Aero board/SDK, all other 1000+ BYT/CHT models don't need this.

This false outside of the standard webcam use scenario which we are trying to get working and this involves a bunch of hacks / special exceptions all over the code, so lets remove this.

---
 .../media/atomisp/include/linux/atomisp.h     |  2 -
 .../staging/media/atomisp/pci/atomisp_cmd.c   | 24 +-------
 .../media/atomisp/pci/atomisp_internal.h      |  5 --
 .../staging/media/atomisp/pci/atomisp_ioctl.c | 59 -------------------
 .../staging/media/atomisp/pci/atomisp_ioctl.h |  3 -
 .../media/atomisp/pci/atomisp_subdev.c        | 36 -----------
 .../media/atomisp/pci/atomisp_subdev.h        |  1 -
 7 files changed, 1 insertion(+), 129 deletions(-)
drivers/staging/media/atomisp/include/linux/atomisp.h +0 -2
index 63b1bcd35399..1dc7ac2b90ba 100644
@@ -1107,8 +1107,6 @@ struct atomisp_sensor_ae_bracketing_lut {
 /* Lock and unlock raw buffer */
 #define V4L2_CID_ENABLE_RAW_BUFFER_LOCK (V4L2_CID_CAMERA_LASTP1 + 29)
 
-#define V4L2_CID_DEPTH_MODE		(V4L2_CID_CAMERA_LASTP1 + 30)
-
 #define V4L2_CID_EXPOSURE_ZONE_NUM	(V4L2_CID_CAMERA_LASTP1 + 31)
 /* Disable digital zoom */
 #define V4L2_CID_DISABLE_DZ		(V4L2_CID_CAMERA_LASTP1 + 32)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -23
index 47f18ac5e40e..a89686ac2d97 100644
@@ -1114,9 +1114,8 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 	struct pci_dev *pdev = to_pci_dev(isp->dev);
 	enum ia_css_pipe_id css_pipe_id;
 	bool stream_restart[MAX_STREAM_NUM] = {0};
-	bool depth_mode = false;
-	int i, ret, depth_cnt = 0;
 	unsigned long flags;
+	int i, ret;
 
 	lockdep_assert_held(&isp->mutex);
 
@@ -1134,8 +1133,6 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 		    !asd->stream_prepared)
 			continue;
 
-		depth_cnt++;
-
 		if (asd->delayed_init == ATOMISP_DELAYED_INIT_QUEUED)
 			cancel_work_sync(&asd->delayed_init_work);
 
@@ -1186,13 +1183,6 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 	atomisp_reset(isp);
 	isp->isp_timeout = false;
 
-	if (!isp_timeout) {
-		for (i = 0; i < isp->num_of_streams; i++) {
-			if (isp->asd[i].depth_mode->val)
-				return;
-		}
-	}
-
 	for (i = 0; i < isp->num_of_streams; i++) {
 		struct atomisp_sub_device *asd = &isp->asd[i];
 
@@ -1248,12 +1238,6 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 		atomisp_recover_params_queue(&asd->video_out_preview);
 		atomisp_recover_params_queue(&asd->video_out_video_capture);
 
-		if ((asd->depth_mode->val) &&
-		    (depth_cnt == ATOMISP_DEPTH_SENSOR_STREAMON_COUNT)) {
-			depth_mode = true;
-			continue;
-		}
-
 		ret = v4l2_subdev_call(
 			  isp->inputs[asd->input_curr].camera, video,
 			  s_stream, 1);
@@ -1261,12 +1245,6 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 			dev_warn(isp->dev,
 				 "can't start streaming on sensor!\n");
 	}
-
-	if (depth_mode) {
-		if (atomisp_stream_on_master_slave_sensor(isp, true))
-			dev_warn(isp->dev,
-				 "master slave sensor stream on failed!\n");
-	}
 }
 
 void atomisp_assert_recovery_work(struct work_struct *work)
drivers/staging/media/atomisp/pci/atomisp_internal.h +0 -5
index fa38d91420cf..90caa4254893 100644
@@ -133,11 +133,6 @@
 	(ATOMISP_SOC_CAMERA(asd) && ATOMISP_CSS_SUPPORT_YUVPP && \
 	!asd->copy_mode)
 
-#define ATOMISP_DEPTH_SENSOR_STREAMON_COUNT 2
-
-#define ATOMISP_DEPTH_DEFAULT_MASTER_SENSOR 0
-#define ATOMISP_DEPTH_DEFAULT_SLAVE_SENSOR 1
-
 /* ISP2401 */
 #define ATOMISP_ION_DEVICE_FD_OFFSET   16
 #define ATOMISP_ION_SHARED_FD_MASK     (0xFFFF)
drivers/staging/media/atomisp/pci/atomisp_ioctl.c +0 -59

77 lines not on this page · raw message

drivers/staging/media/atomisp/pci/atomisp_ioctl.h +0 -3
index 59e071f035f9..93139decf1d0 100644
@@ -53,9 +53,6 @@ unsigned int atomisp_streaming_count(struct atomisp_device *isp);
 long atomisp_compat_ioctl32(struct file *file,
 			    unsigned int cmd, unsigned long arg);
 
-int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp,
-	bool isp_timeout);
-
 int atomisp_start_streaming(struct vb2_queue *vq, unsigned int count);
 void atomisp_stop_streaming(struct vb2_queue *vq);
 
drivers/staging/media/atomisp/pci/atomisp_subdev.c +0 -36
index 9cfb85c61db6..4cbe900d3ca1 100644
@@ -758,23 +758,9 @@ static int s_ctrl(struct v4l2_ctrl *ctrl)
 {
 	struct atomisp_sub_device *asd = container_of(
 					     ctrl->handler, struct atomisp_sub_device, ctrl_handler);
-	unsigned int streaming;
-	unsigned long flags;
-
 	switch (ctrl->id) {
 	case V4L2_CID_RUN_MODE:
 		return __atomisp_update_run_mode(asd);
-	case V4L2_CID_DEPTH_MODE:
-		/* Use spinlock instead of mutex to avoid possible locking issues */
-		spin_lock_irqsave(&asd->isp->lock, flags);
-		streaming = asd->streaming;
-		spin_unlock_irqrestore(&asd->isp->lock, flags);
-		if (streaming != ATOMISP_DEVICE_STREAMING_DISABLED) {
-			dev_err(asd->isp->dev,
-				"ISP is streaming, it is not supported to change the depth mode\n");
-			return -EINVAL;
-		}
-		break;
 	}
 
 	return 0;
@@ -930,24 +916,6 @@ static const struct v4l2_ctrl_config ctrl_disable_dz = {
 	.def = 0,
 };
 
-/*
- * Control for ISP depth mode
- *
- * When enabled, that means ISP will deal with dual streams and sensors will be
- * in slave/master mode.
- * slave sensor will have no output until master sensor is streamed on.
- */
-static const struct v4l2_ctrl_config ctrl_depth_mode = {
-	.ops = &ctrl_ops,
-	.id = V4L2_CID_DEPTH_MODE,
-	.type = V4L2_CTRL_TYPE_BOOLEAN,
-	.name = "Depth mode",
-	.min = 0,
-	.max = 1,
-	.step = 1,
-	.def = 0,
-};
-
 static int atomisp_init_subdev_pipe(struct atomisp_sub_device *asd,
 				    struct atomisp_video_pipe *pipe, enum v4l2_buf_type buf_type)
 {
@@ -1086,10 +1054,6 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
 	    v4l2_ctrl_new_custom(&asd->ctrl_handler,
 				 &ctrl_enable_raw_buffer_lock,
 				 NULL);
-	asd->depth_mode =
-	    v4l2_ctrl_new_custom(&asd->ctrl_handler,
-				 &ctrl_depth_mode,
-				 NULL);
 	asd->disable_dz =
 	    v4l2_ctrl_new_custom(&asd->ctrl_handler,
 				 &ctrl_disable_dz,
drivers/staging/media/atomisp/pci/atomisp_subdev.h +0 -1
index daa6077a83bd..5cf8f3d9c916 100644
@@ -266,7 +266,6 @@ struct atomisp_sub_device {
 	struct v4l2_ctrl_handler ctrl_handler;
 	struct v4l2_ctrl *fmt_auto;
 	struct v4l2_ctrl *run_mode;
-	struct v4l2_ctrl *depth_mode;
 	struct v4l2_ctrl *vfpp;
 	struct v4l2_ctrl *continuous_mode;
 	struct v4l2_ctrl *continuous_raw_buffer_size;
Signature · 1 line
2.39.1
maintainer Reviewed-by on v1 1/10
#2 lore raw

Re: [PATCH 01/10] media: atomisp: Remove depth-mode support

Quoted 12 lines · Hans de Goede

Remove support for depth mode. This is a special mode where 2 streams (from 2 different sensors) can be setup and then starting/stopping 1 will automatically also start/stop the other.

Like many of these special features I'm pretty sure that if the queue setup is not done exactly right things will crash and there is no error checking for this.

This seems to be for stereoscopic vision and the only known hw which actually supports this is the Intel Aero board/SDK, all other 1000+ BYT/CHT models don't need this.

Quoted 5 lines

This false outside of the standard webcam use scenario which we are trying to get working and this involves a bunch of hacks / special exceptions all over the code, so lets remove this.

Note that b4 has a mode when the patch series can be merged in a similar way as PR where cover letter becomes a merge commit message. In such case you may write a good description with all links and other material there and use that mode, it will be saved in the Git.

Quoted 281 lines
---
 .../media/atomisp/include/linux/atomisp.h     |  2 -
 .../staging/media/atomisp/pci/atomisp_cmd.c   | 24 +-------
 .../media/atomisp/pci/atomisp_internal.h      |  5 --
 .../staging/media/atomisp/pci/atomisp_ioctl.c | 59 -------------------
 .../staging/media/atomisp/pci/atomisp_ioctl.h |  3 -
 .../media/atomisp/pci/atomisp_subdev.c        | 36 -----------
 .../media/atomisp/pci/atomisp_subdev.h        |  1 -
 7 files changed, 1 insertion(+), 129 deletions(-)
drivers/staging/media/atomisp/include/linux/atomisp.h +0 -2
index 63b1bcd35399..1dc7ac2b90ba 100644
@@ -1107,8 +1107,6 @@ struct atomisp_sensor_ae_bracketing_lut {
 /* Lock and unlock raw buffer */
 #define V4L2_CID_ENABLE_RAW_BUFFER_LOCK (V4L2_CID_CAMERA_LASTP1 + 29)
 
-#define V4L2_CID_DEPTH_MODE		(V4L2_CID_CAMERA_LASTP1 + 30)
-
 #define V4L2_CID_EXPOSURE_ZONE_NUM	(V4L2_CID_CAMERA_LASTP1 + 31)
 /* Disable digital zoom */
 #define V4L2_CID_DISABLE_DZ		(V4L2_CID_CAMERA_LASTP1 + 32)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -23
index 47f18ac5e40e..a89686ac2d97 100644
@@ -1114,9 +1114,8 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 	struct pci_dev *pdev = to_pci_dev(isp->dev);
 	enum ia_css_pipe_id css_pipe_id;
 	bool stream_restart[MAX_STREAM_NUM] = {0};
-	bool depth_mode = false;
-	int i, ret, depth_cnt = 0;
 	unsigned long flags;
+	int i, ret;
 
 	lockdep_assert_held(&isp->mutex);
 
@@ -1134,8 +1133,6 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 		    !asd->stream_prepared)
 			continue;
 
-		depth_cnt++;
-
 		if (asd->delayed_init == ATOMISP_DELAYED_INIT_QUEUED)
 			cancel_work_sync(&asd->delayed_init_work);
 
@@ -1186,13 +1183,6 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 	atomisp_reset(isp);
 	isp->isp_timeout = false;
 
-	if (!isp_timeout) {
-		for (i = 0; i < isp->num_of_streams; i++) {
-			if (isp->asd[i].depth_mode->val)
-				return;
-		}
-	}
-
 	for (i = 0; i < isp->num_of_streams; i++) {
 		struct atomisp_sub_device *asd = &isp->asd[i];
 
@@ -1248,12 +1238,6 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 		atomisp_recover_params_queue(&asd->video_out_preview);
 		atomisp_recover_params_queue(&asd->video_out_video_capture);
 
-		if ((asd->depth_mode->val) &&
-		    (depth_cnt == ATOMISP_DEPTH_SENSOR_STREAMON_COUNT)) {
-			depth_mode = true;
-			continue;
-		}
-
 		ret = v4l2_subdev_call(
 			  isp->inputs[asd->input_curr].camera, video,
 			  s_stream, 1);
@@ -1261,12 +1245,6 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 			dev_warn(isp->dev,
 				 "can't start streaming on sensor!\n");
 	}
-
-	if (depth_mode) {
-		if (atomisp_stream_on_master_slave_sensor(isp, true))
-			dev_warn(isp->dev,
-				 "master slave sensor stream on failed!\n");
-	}
 }
 
 void atomisp_assert_recovery_work(struct work_struct *work)
drivers/staging/media/atomisp/pci/atomisp_internal.h +0 -5
index fa38d91420cf..90caa4254893 100644
@@ -133,11 +133,6 @@
 	(ATOMISP_SOC_CAMERA(asd) && ATOMISP_CSS_SUPPORT_YUVPP && \
 	!asd->copy_mode)
 
-#define ATOMISP_DEPTH_SENSOR_STREAMON_COUNT 2
-
-#define ATOMISP_DEPTH_DEFAULT_MASTER_SENSOR 0
-#define ATOMISP_DEPTH_DEFAULT_SLAVE_SENSOR 1
-
 /* ISP2401 */
 #define ATOMISP_ION_DEVICE_FD_OFFSET   16
 #define ATOMISP_ION_SHARED_FD_MASK     (0xFFFF)
drivers/staging/media/atomisp/pci/atomisp_ioctl.c +0 -59
index d1314bdbf7d5..d3b773bac5aa 100644
@@ -1173,51 +1173,6 @@ static unsigned int atomisp_sensor_start_stream(struct atomisp_sub_device *asd)
 		return 1;
 }
 
-int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp,
-	bool isp_timeout)
-{
-	unsigned int master, slave, delay_slave = 0;
-	int ret;
-
-	master = ATOMISP_DEPTH_DEFAULT_MASTER_SENSOR;
-	slave = ATOMISP_DEPTH_DEFAULT_SLAVE_SENSOR;
-	dev_warn(isp->dev,
-		 "depth mode use default master=%s.slave=%s.\n",
-		 isp->inputs[master].camera->name,
-		 isp->inputs[slave].camera->name);
-
-	ret = v4l2_subdev_call(isp->inputs[master].camera, core,
-			       ioctl, ATOMISP_IOC_G_DEPTH_SYNC_COMP,
-			       &delay_slave);
-	if (ret)
-		dev_warn(isp->dev,
-			 "get depth sensor %s compensation delay failed.\n",
-			 isp->inputs[master].camera->name);
-
-	ret = v4l2_subdev_call(isp->inputs[master].camera,
-			       video, s_stream, 1);
-	if (ret) {
-		dev_err(isp->dev, "depth mode master sensor %s stream-on failed.\n",
-			isp->inputs[master].camera->name);
-		return -EINVAL;
-	}
-
-	if (delay_slave != 0)
-		udelay(delay_slave);
-
-	ret = v4l2_subdev_call(isp->inputs[slave].camera,
-			       video, s_stream, 1);
-	if (ret) {
-		dev_err(isp->dev, "depth mode slave sensor %s stream-on failed.\n",
-			isp->inputs[slave].camera->name);
-		v4l2_subdev_call(isp->inputs[master].camera, video, s_stream, 0);
-
-		return -EINVAL;
-	}
-
-	return 0;
-}
-
 /* Input system HW workaround */
 /* Input system address translation corrupts burst during */
 /* invalidate. SW workaround for this is to set burst length */
@@ -1396,19 +1351,6 @@ int atomisp_start_streaming(struct vb2_queue *vq, unsigned int count)
 			dev_dbg(isp->dev, "DFS auto mode failed!\n");
 	}
 
-	if (asd->depth_mode->val && atomisp_streaming_count(isp) ==
-	    ATOMISP_DEPTH_SENSOR_STREAMON_COUNT) {
-		ret = atomisp_stream_on_master_slave_sensor(isp, false);
-		if (ret) {
-			dev_err(isp->dev, "master slave sensor stream on failed!\n");
-			goto out_unlock;
-		}
-		goto start_delay_wq;
-	} else if (asd->depth_mode->val && (atomisp_streaming_count(isp) <
-					    ATOMISP_DEPTH_SENSOR_STREAMON_COUNT)) {
-		goto start_delay_wq;
-	}
-
 	/* Enable the CSI interface on ANN B0/K0 */
 	if (isp->media_dev.hw_revision >= ((ATOMISP_HW_REVISION_ISP2401 <<
 					    ATOMISP_HW_REVISION_SHIFT) | ATOMISP_HW_STEPPING_B0)) {
@@ -1427,7 +1369,6 @@ int atomisp_start_streaming(struct vb2_queue *vq, unsigned int count)
 		goto out_unlock;
 	}
 
-start_delay_wq:
 	if (asd->continuous_mode->val) {
 		atomisp_subdev_get_ffmt(&asd->subdev, NULL,
 				        V4L2_SUBDEV_FORMAT_ACTIVE,
drivers/staging/media/atomisp/pci/atomisp_ioctl.h +0 -3
index 59e071f035f9..93139decf1d0 100644
@@ -53,9 +53,6 @@ unsigned int atomisp_streaming_count(struct atomisp_device *isp);
 long atomisp_compat_ioctl32(struct file *file,
 			    unsigned int cmd, unsigned long arg);
 
-int atomisp_stream_on_master_slave_sensor(struct atomisp_device *isp,
-	bool isp_timeout);
-
 int atomisp_start_streaming(struct vb2_queue *vq, unsigned int count);
 void atomisp_stop_streaming(struct vb2_queue *vq);
 
drivers/staging/media/atomisp/pci/atomisp_subdev.c +0 -36
index 9cfb85c61db6..4cbe900d3ca1 100644
@@ -758,23 +758,9 @@ static int s_ctrl(struct v4l2_ctrl *ctrl)
 {
 	struct atomisp_sub_device *asd = container_of(
 					     ctrl->handler, struct atomisp_sub_device, ctrl_handler);
-	unsigned int streaming;
-	unsigned long flags;
-
 	switch (ctrl->id) {
 	case V4L2_CID_RUN_MODE:
 		return __atomisp_update_run_mode(asd);
-	case V4L2_CID_DEPTH_MODE:
-		/* Use spinlock instead of mutex to avoid possible locking issues */
-		spin_lock_irqsave(&asd->isp->lock, flags);
-		streaming = asd->streaming;
-		spin_unlock_irqrestore(&asd->isp->lock, flags);
-		if (streaming != ATOMISP_DEVICE_STREAMING_DISABLED) {
-			dev_err(asd->isp->dev,
-				"ISP is streaming, it is not supported to change the depth mode\n");
-			return -EINVAL;
-		}
-		break;
 	}
 
 	return 0;
@@ -930,24 +916,6 @@ static const struct v4l2_ctrl_config ctrl_disable_dz = {
 	.def = 0,
 };
 
-/*
- * Control for ISP depth mode
- *
- * When enabled, that means ISP will deal with dual streams and sensors will be
- * in slave/master mode.
- * slave sensor will have no output until master sensor is streamed on.
- */
-static const struct v4l2_ctrl_config ctrl_depth_mode = {
-	.ops = &ctrl_ops,
-	.id = V4L2_CID_DEPTH_MODE,
-	.type = V4L2_CTRL_TYPE_BOOLEAN,
-	.name = "Depth mode",
-	.min = 0,
-	.max = 1,
-	.step = 1,
-	.def = 0,
-};
-
 static int atomisp_init_subdev_pipe(struct atomisp_sub_device *asd,
 				    struct atomisp_video_pipe *pipe, enum v4l2_buf_type buf_type)
 {
@@ -1086,10 +1054,6 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
 	    v4l2_ctrl_new_custom(&asd->ctrl_handler,
 				 &ctrl_enable_raw_buffer_lock,
 				 NULL);
-	asd->depth_mode =
-	    v4l2_ctrl_new_custom(&asd->ctrl_handler,
-				 &ctrl_depth_mode,
-				 NULL);
 	asd->disable_dz =
 	    v4l2_ctrl_new_custom(&asd->ctrl_handler,
 				 &ctrl_disable_dz,
drivers/staging/media/atomisp/pci/atomisp_subdev.h +0 -1
index daa6077a83bd..5cf8f3d9c916 100644
@@ -266,7 +266,6 @@ struct atomisp_sub_device {
 	struct v4l2_ctrl_handler ctrl_handler;
 	struct v4l2_ctrl *fmt_auto;
 	struct v4l2_ctrl *run_mode;
-	struct v4l2_ctrl *depth_mode;
 	struct v4l2_ctrl *vfpp;
 	struct v4l2_ctrl *continuous_mode;
 	struct v4l2_ctrl *continuous_raw_buffer_size;
Signature · 1 line
2.39.1
Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw

PATCH 2/10 media: atomisp: Remove continuous mode support

In reply to Hans de Goede

Continues mode is a special mode where 2 /dev/video devices can be active at the same time. Either the video-preview + video nodes or the viewfinder (for still capture) + capture nodes.

For the video-preview + video-recording case modern userspace will use a single stream multiplexed by pipewire.

The still-capture case is extra special only starting the preview stream and then relying on a custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl to set things up followed by a second stream on to capture the amount of configured still pictures. While running the sensor at full resolution all the time. This case too is better handled with dma-buf + GPU downscaling for the view-finder rather then all this custom special code. Besises this the ioctl expects a bunch of special non error checked conditions to be met otherwise things will crash/hang.

The continues mode also involves a special cases all over the code getting in the way of further cleanups and simplifying the code to using just 1 /dev/video# node. So lets remove it and the related custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl.

---
 .../media/atomisp/include/linux/atomisp.h     |  23 -
 .../staging/media/atomisp/pci/atomisp_cmd.c   | 574 ++----------------
 .../staging/media/atomisp/pci/atomisp_cmd.h   |   3 -
 .../media/atomisp/pci/atomisp_compat_css20.c  |  70 +--
 .../staging/media/atomisp/pci/atomisp_fops.c  |  56 --
 .../staging/media/atomisp/pci/atomisp_ioctl.c |  95 +--
 .../media/atomisp/pci/atomisp_subdev.c        |  32 +-
 .../media/atomisp/pci/atomisp_subdev.h        |   4 -
 8 files changed, 79 insertions(+), 778 deletions(-)
drivers/staging/media/atomisp/include/linux/atomisp.h +0 -23
index 1dc7ac2b90ba..290a6ed7237e 100644
@@ -299,26 +299,6 @@ struct atomisp_3a_statistics {
 	u32 isp_config_id; /* isp config ID */
 };
 
-/**
- * struct atomisp_cont_capture_conf - continuous capture parameters
- * @num_captures: number of still images to capture
- * @skip_frames: number of frames to skip between 2 captures
- * @offset: offset in ring buffer to start capture
- *
- * For example, to capture 1 frame from past, current, and 1 from future
- * and skip one frame between each capture, parameters would be:
- * num_captures:3
- * skip_frames:1
- * offset:-2
- */
-
-struct atomisp_cont_capture_conf {
-	int num_captures;
-	unsigned int skip_frames;
-	int offset;
-	__u32 reserved[5];
-};
-
 struct atomisp_ae_window {
 	int x_left;
 	int x_right;
@@ -958,9 +938,6 @@ struct atomisp_sensor_ae_bracketing_lut {
 #define ATOMISP_IOC_S_PARAMETERS \
 	_IOW('v', BASE_VIDIOC_PRIVATE + 32, struct atomisp_parameters)
 
-#define ATOMISP_IOC_S_CONT_CAPTURE_CONFIG \
-	_IOWR('v', BASE_VIDIOC_PRIVATE + 33, struct atomisp_cont_capture_conf)
-
 #define ATOMISP_IOC_G_METADATA \
 	_IOWR('v', BASE_VIDIOC_PRIVATE + 34, struct atomisp_metadata)
 
drivers/staging/media/atomisp/pci/atomisp_cmd.c +61 -513

718 lines not on this page · raw message

drivers/staging/media/atomisp/pci/atomisp_cmd.h +0 -3
index 733b9f8cd06f..bea950a128a9 100644
@@ -268,9 +268,6 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f);
 int atomisp_set_shading_table(struct atomisp_sub_device *asd,
 			      struct atomisp_shading_table *shading_table);
 
-int atomisp_offline_capture_configure(struct atomisp_sub_device *asd,
-				      struct atomisp_cont_capture_conf *cvf_config);
-
 void atomisp_free_internal_buffers(struct atomisp_sub_device *asd);
 
 int atomisp_s_ae_window(struct atomisp_sub_device *asd,
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +13 -57

125 lines not on this page · raw message

drivers/staging/media/atomisp/pci/atomisp_fops.c +0 -56

90 lines not on this page · raw message

drivers/staging/media/atomisp/pci/atomisp_ioctl.c +2 -93

132 lines not on this page · raw message

drivers/staging/media/atomisp/pci/atomisp_subdev.c +3 -29
index 4cbe900d3ca1..821f3204b759 100644
@@ -427,8 +427,7 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
 			isp_sd->params.video_dis_en = 0;
 
 		if (isp_sd->params.video_dis_en &&
-		    isp_sd->run_mode->val == ATOMISP_RUN_MODE_VIDEO &&
-		    !isp_sd->continuous_mode->val) {
+		    isp_sd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
 			/* This resolution contains 20 % of DVS slack
 			 * (of the desired captured image before
 			 * scaling, or 1 / 6 of what we get from the
@@ -459,8 +458,7 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
 			break;
 
 		if (isp_sd->params.video_dis_en &&
-		    isp_sd->run_mode->val == ATOMISP_RUN_MODE_VIDEO &&
-		    !isp_sd->continuous_mode->val) {
+		    isp_sd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
 			dvs_w = rounddown(crop[pad]->width / 5,
 					  ATOM_ISP_STEP_WIDTH);
 			dvs_h = rounddown(crop[pad]->height / 5,
@@ -727,11 +725,7 @@ static int __atomisp_update_run_mode(struct atomisp_sub_device *asd)
 	struct v4l2_ctrl *c;
 	s32 mode;
 
-	if (ctrl->val != ATOMISP_RUN_MODE_VIDEO &&
-	    asd->continuous_mode->val)
-		mode = ATOMISP_RUN_MODE_PREVIEW;
-	else
-		mode = ctrl->val;
+	mode = ctrl->val;
 
 	c = v4l2_ctrl_find(
 		isp->inputs[asd->input_curr].camera->ctrl_handler,
@@ -816,24 +810,6 @@ static const struct v4l2_ctrl_config ctrl_vfpp = {
 	.qmenu = ctrl_vfpp_mode_menu,
 };
 
-/*
- * Control for ISP continuous mode
- *
- * When enabled, capture processing is possible without
- * stopping the preview pipeline. When disabled, ISP needs
- * to be restarted between preview and capture.
- */
-static const struct v4l2_ctrl_config ctrl_continuous_mode = {
-	.ops = &ctrl_ops,
-	.id = V4L2_CID_ATOMISP_CONTINUOUS_MODE,
-	.type = V4L2_CTRL_TYPE_BOOLEAN,
-	.name = "Continuous mode",
-	.min = 0,
-	.max = 1,
-	.step = 1,
-	.def = 0,
-};
-
 /*
  * Control for continuous mode raw buffer size
  *
@@ -1040,8 +1016,6 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
 					     &ctrl_run_mode, NULL);
 	asd->vfpp = v4l2_ctrl_new_custom(&asd->ctrl_handler,
 					 &ctrl_vfpp, NULL);
-	asd->continuous_mode = v4l2_ctrl_new_custom(&asd->ctrl_handler,
-			       &ctrl_continuous_mode, NULL);
 	asd->continuous_viewfinder = v4l2_ctrl_new_custom(&asd->ctrl_handler,
 				     &ctrl_continuous_viewfinder,
 				     NULL);
drivers/staging/media/atomisp/pci/atomisp_subdev.h +0 -4
index 5cf8f3d9c916..141b93a6c0be 100644
@@ -237,8 +237,6 @@ struct atomisp_subdev_params {
 	enum atomisp_flash_state flash_state;
 	enum atomisp_frame_status last_frame_status;
 
-	/* continuous capture */
-	struct atomisp_cont_capture_conf offline_parm;
 	/* Flag to check if driver needs to update params to css */
 	bool css_update_params_needed;
 };
@@ -267,7 +265,6 @@ struct atomisp_sub_device {
 	struct v4l2_ctrl *fmt_auto;
 	struct v4l2_ctrl *run_mode;
 	struct v4l2_ctrl *vfpp;
-	struct v4l2_ctrl *continuous_mode;
 	struct v4l2_ctrl *continuous_raw_buffer_size;
 	struct v4l2_ctrl *continuous_viewfinder;
 	struct v4l2_ctrl *enable_raw_buffer_lock;
@@ -351,7 +348,6 @@ struct atomisp_sub_device {
 
 	struct atomisp_resolution sensor_array_res;
 	bool high_speed_mode; /* Indicate whether now is a high speed mode */
-	int pending_capture_request; /* Indicates the number of pending capture requests. */
 
 	unsigned int preview_exp_id;
 	unsigned int postview_exp_id;
Signature · 1 line
2.39.1
maintainer
#4 lore raw

Re: [PATCH 02/10] media: atomisp: Remove continuous mode support

Quoted 20 lines · Hans de Goede

Continues mode is a special mode where 2 /dev/video devices can be active at the same time. Either the video-preview + video nodes or the viewfinder (for still capture) + capture nodes.

For the video-preview + video-recording case modern userspace will use a single stream multiplexed by pipewire.

The still-capture case is extra special only starting the preview stream and then relying on a custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl to set things up followed by a second stream on to capture the amount of configured still pictures. While running the sensor at full resolution all the time. This case too is better handled with dma-buf + GPU downscaling for the view-finder rather then all this custom special code. Besises this the ioctl expects a bunch of special non error checked conditions to be met otherwise things will crash/hang.

The continues mode also involves a special cases all over the code getting in the way of further cleanups and simplifying the code to using just 1 /dev/video# node. So lets remove it and the related custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl.

...

drivers/staging/media/atomisp/pci/atomisp_cmd.c int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f) · line 4884

Quoted 2 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +2 -0
+	ret = atomisp_set_fmt_to_snr(vdev, &s_fmt,
+				     f->fmt.pix.pixelformat, padding_w,

At least one parameter can be moved to the previous line.

Quoted 5 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +5 -0
+				     padding_h, dvs_env_w, dvs_env_h);
+	if (ret) {
+		dev_warn(isp->dev,
+			 "Set format to sensor failed with %d\n", ret);
+		return -EINVAL;

...

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c static bool is_pipe_valid_to_current_run_mode(struct atomisp_sub_device *asd, · line 657

Quoted 11 lines
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +3 -6
 	case ATOMISP_RUN_MODE_PREVIEW:
-		if (!asd->continuous_mode->val) {
-			if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
-				return true;
+		if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+			return true;
 
-			return false;
-		}
-		fallthrough;
+		return false;
		return pipe_id == IA_CSS_PIPE_ID_PREVIEW;

...

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c static bool is_pipe_valid_to_current_run_mode(struct atomisp_sub_device *asd, · line 668

Quoted 13 lines
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +4 -8
 	case ATOMISP_RUN_MODE_VIDEO:
-		if (!asd->continuous_mode->val) {
-			if (pipe_id == IA_CSS_PIPE_ID_VIDEO ||
-			    pipe_id == IA_CSS_PIPE_ID_YUVPP)
-				return true;
-			else
-				return false;
-		}
-		fallthrough;
+		if (pipe_id == IA_CSS_PIPE_ID_VIDEO || pipe_id == IA_CSS_PIPE_ID_YUVPP)
+			return true;
+
+		return false;

Similar.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#5 lore raw

Re: [PATCH 02/10] media: atomisp: Remove continuous mode support

Hi Andy,

Thank you for the reviews!

Quoted 22 lines · Andy Shevchenko
Quoted 16 lines · Hans de Goede

Continues mode is a special mode where 2 /dev/video devices can be active at the same time. Either the video-preview + video nodes or the viewfinder (for still capture) + capture nodes.

For the video-preview + video-recording case modern userspace will use a single stream multiplexed by pipewire.

The still-capture case is extra special only starting the preview stream and then relying on a custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl to set things up followed by a second stream on to capture the amount of configured still pictures. While running the sensor at full resolution all the time. This case too is better handled with dma-buf + GPU downscaling for the view-finder rather then all this custom special code. Besises this the ioctl expects a bunch of special non error checked conditions to be met otherwise things will crash/hang.

Quoted 4 lines

The continues mode also involves a special cases all over the code getting in the way of further cleanups and simplifying the code to using just 1 /dev/video# node. So lets remove it and the related custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl.

Quoted 6 lines

...

drivers/staging/media/atomisp/pci/atomisp_cmd.c int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f) · line 4884

Quoted 2 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +2 -0
+	ret = atomisp_set_fmt_to_snr(vdev, &s_fmt,
+				     f->fmt.pix.pixelformat, padding_w,

At least one parameter can be moved to the previous line.

Ack, fixed in my local tree which I will push to:

https://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux.git/log/?h=media-atomisp

When I'm done processing your other review remarks.

Quoted 16 lines
Quoted 6 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +5 -0
+				     padding_h, dvs_env_w, dvs_env_h);
+	if (ret) {
+		dev_warn(isp->dev,
+			 "Set format to sensor failed with %d\n", ret);
+		return -EINVAL;

...

Quoted 7 lines
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +2 -3
 	case ATOMISP_RUN_MODE_PREVIEW:
-		if (!asd->continuous_mode->val) {
-			if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
-				return true;
+		if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+			return true;
Quoted 6 lines

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c static bool is_pipe_valid_to_current_run_mode(struct atomisp_sub_device *asd, · line 657

Quoted 4 lines
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +1 -3
-			return false;
-		}
-		fallthrough;
+		return false;
		return pipe_id == IA_CSS_PIPE_ID_PREVIEW;

I agree that that is cleaner, but there are a bunch of other cases in this switch case which are not touched by this patch and they all follow the same pattern as which the modified cases use after this patch, e.g. :

        case ATOMISP_RUN_MODE_STILL_CAPTURE:
                if (pipe_id == IA_CSS_PIPE_ID_CAPTURE)
                        return true;

                return false;

So this patch basically makes all of them consistent with each other. So I'm going to keep this as is.

Regards,

Hans

Quoted 19 lines

...

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c static bool is_pipe_valid_to_current_run_mode(struct atomisp_sub_device *asd, · line 668

Quoted 13 lines
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +4 -8
 	case ATOMISP_RUN_MODE_VIDEO:
-		if (!asd->continuous_mode->val) {
-			if (pipe_id == IA_CSS_PIPE_ID_VIDEO ||
-			    pipe_id == IA_CSS_PIPE_ID_YUVPP)
-				return true;
-			else
-				return false;
-		}
-		fallthrough;
+		if (pipe_id == IA_CSS_PIPE_ID_VIDEO || pipe_id == IA_CSS_PIPE_ID_YUVPP)
+			return true;
+
+		return false;

Similar.

#6 lore raw

Re: [PATCH 02/10] media: atomisp: Remove continuous mode support

Quoted 69 lines · Hans de Goede

Hi Andy,

Thank you for the reviews!

Quoted 22 lines · Andy Shevchenko
Quoted 16 lines · Hans de Goede

Continues mode is a special mode where 2 /dev/video devices can be active at the same time. Either the video-preview + video nodes or the viewfinder (for still capture) + capture nodes.

For the video-preview + video-recording case modern userspace will use a single stream multiplexed by pipewire.

The still-capture case is extra special only starting the preview stream and then relying on a custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl to set things up followed by a second stream on to capture the amount of configured still pictures. While running the sensor at full resolution all the time. This case too is better handled with dma-buf + GPU downscaling for the view-finder rather then all this custom special code. Besises this the ioctl expects a bunch of special non error checked conditions to be met otherwise things will crash/hang.

Quoted 4 lines

The continues mode also involves a special cases all over the code getting in the way of further cleanups and simplifying the code to using just 1 /dev/video# node. So lets remove it and the related custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl.

Quoted 6 lines

...

drivers/staging/media/atomisp/pci/atomisp_cmd.c int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f) · line 4884

Quoted 2 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +2 -0
+    ret = atomisp_set_fmt_to_snr(vdev, &s_fmt,
+                                 f->fmt.pix.pixelformat, padding_w,

At least one parameter can be moved to the previous line.

Ack, fixed in my local tree which I will push to:

https://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux.git/log/?h=media-atomisp

When I'm done processing your other review remarks.

Quoted 16 lines
Quoted 6 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +5 -0
+                                 padding_h, dvs_env_w, dvs_env_h);
+    if (ret) {
+            dev_warn(isp->dev,
+                     "Set format to sensor failed with %d\n", ret);
+            return -EINVAL;

...

Quoted 7 lines

case ATOMISP_RUN_MODE_PREVIEW:

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +2 -3
-            if (!asd->continuous_mode->val) {
-                    if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
-                            return true;
+            if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+                    return true;
Quoted 6 lines

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c static bool is_pipe_valid_to_current_run_mode(struct atomisp_sub_device *asd, · line 657

Quoted 4 lines
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +1 -3
-                    return false;
-            }
-            fallthrough;
+            return false;
              return pipe_id == IA_CSS_PIPE_ID_PREVIEW;

I agree that that is cleaner, but there are a bunch of other cases in this switch case which are not touched by this patch and they all follow the same pattern as which the modified cases use after this patch, e.g. :

Quoted 8 lines
        case ATOMISP_RUN_MODE_STILL_CAPTURE:
                if (pipe_id == IA_CSS_PIPE_ID_CAPTURE)
                        return true;

                return false;

So this patch basically makes all of them consistent with each other. So I'm going to keep this as is.

So, I haven't checked the patch series of 28, but perhaps the above is a good candidate to have across the entire code, so we reduce the codebase.
...

Quoted 15 lines
Quoted 15 lines

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c static bool is_pipe_valid_to_current_run_mode(struct atomisp_sub_device *asd, · line 668

Quoted 13 lines

case ATOMISP_RUN_MODE_VIDEO:

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +4 -8
-            if (!asd->continuous_mode->val) {
-                    if (pipe_id == IA_CSS_PIPE_ID_VIDEO ||
-                        pipe_id == IA_CSS_PIPE_ID_YUVPP)
-                            return true;
-                    else
-                            return false;
-            }
-            fallthrough;
+            if (pipe_id == IA_CSS_PIPE_ID_VIDEO || pipe_id == IA_CSS_PIPE_ID_YUVPP)
+                    return true;
+
+            return false;

Similar.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#7 lore raw

Re: [PATCH 02/10] media: atomisp: Remove continuous mode support

Hi Andy,

Quoted 76 lines · Andy Shevchenko
Quoted 75 lines · Hans de Goede

Hi Andy,

Thank you for the reviews!

Quoted 22 lines · Andy Shevchenko
Quoted 16 lines · Hans de Goede

Continues mode is a special mode where 2 /dev/video devices can be active at the same time. Either the video-preview + video nodes or the viewfinder (for still capture) + capture nodes.

For the video-preview + video-recording case modern userspace will use a single stream multiplexed by pipewire.

The still-capture case is extra special only starting the preview stream and then relying on a custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl to set things up followed by a second stream on to capture the amount of configured still pictures. While running the sensor at full resolution all the time. This case too is better handled with dma-buf + GPU downscaling for the view-finder rather then all this custom special code. Besises this the ioctl expects a bunch of special non error checked conditions to be met otherwise things will crash/hang.

Quoted 4 lines

The continues mode also involves a special cases all over the code getting in the way of further cleanups and simplifying the code to using just 1 /dev/video# node. So lets remove it and the related custom ATOMISP_IOC_S_CONT_CAPTURE_CONFIG ioctl.

Quoted 6 lines

...

drivers/staging/media/atomisp/pci/atomisp_cmd.c int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f) · line 4884

Quoted 2 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +2 -0
+    ret = atomisp_set_fmt_to_snr(vdev, &s_fmt,
+                                 f->fmt.pix.pixelformat, padding_w,

At least one parameter can be moved to the previous line.

Ack, fixed in my local tree which I will push to:

https://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux.git/log/?h=media-atomisp

When I'm done processing your other review remarks.

Quoted 16 lines
Quoted 6 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +5 -0
+                                 padding_h, dvs_env_w, dvs_env_h);
+    if (ret) {
+            dev_warn(isp->dev,
+                     "Set format to sensor failed with %d\n", ret);
+            return -EINVAL;

...

Quoted 7 lines

case ATOMISP_RUN_MODE_PREVIEW:

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +2 -3
-            if (!asd->continuous_mode->val) {
-                    if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
-                            return true;
+            if (pipe_id == IA_CSS_PIPE_ID_PREVIEW)
+                    return true;
Quoted 6 lines

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c static bool is_pipe_valid_to_current_run_mode(struct atomisp_sub_device *asd, · line 657

Quoted 4 lines
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +1 -3
-                    return false;
-            }
-            fallthrough;
+            return false;
              return pipe_id == IA_CSS_PIPE_ID_PREVIEW;

I agree that that is cleaner, but there are a bunch of other cases in this switch case which are not touched by this patch and they all follow the same pattern as which the modified cases use after this patch, e.g. :

        case ATOMISP_RUN_MODE_STILL_CAPTURE:
                if (pipe_id == IA_CSS_PIPE_ID_CAPTURE)
                        return true;

                return false;
Quoted 7 lines
Quoted 2 lines

So this patch basically makes all of them consistent with each other. So I'm going to keep this as is.

So, I haven't checked the patch series of 28, but perhaps the above is a good candidate to have across the entire code, so we reduce the codebase.
...

I agree I have added a note about this to my list of possible code cleanups (which is quite long) but there are many higher priority issues to solve first.

Regards,

Hans

#8 lore raw

Re: [PATCH 02/10] media: atomisp: Remove continuous mode support

In reply to Hans de Goede
I love your patch! Perhaps something to improve:

Hi Hans,

I love your patch! Perhaps something to improve:

[auto build test WARNING on media-tree/master]
[cannot apply to linus/master v6.2]
[If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Hans-de-Goede/media-atomisp-Remove-depth-mode-support/20230221-230417
base:   git://linuxtv.org/media_tree.git master
patch link:    https://lore.kernel.org/r/20230221145906.8113-3-hdegoede%40redhat.com
patch subject: [PATCH 02/10] media: atomisp: Remove continuous mode support
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230222/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0

reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/130cc40ea8b4d6e5d3a752313fcffe29b63c46a5
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Hans-de-Goede/media-atomisp-Remove-depth-mode-support/20230221-230417 git checkout 130cc40ea8b4d6e5d3a752313fcffe29b63c46a5
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/staging/media/atomisp/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <[email protected]>
| Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All warnings (new ones prefixed by >>):

drivers/staging/media/atomisp/pci/atomisp_cmd.c: In function 'atomisp_get_dvs2_bq_resolutions':

>> drivers/staging/media/atomisp/pci/atomisp_cmd.c:1919:44: warning: variable 'input_config' set but not used [-Wunused-but-set-variable]
    1919 |         struct ia_css_stream_input_config *input_config = NULL;
         |                                            ^~~~~~~~~~~~
   drivers/staging/media/atomisp/pci/atomisp_cmd.c: In function 'atomisp_set_fmt':
>> drivers/staging/media/atomisp/pci/atomisp_cmd.c:4673:36: warning: variable 'isp_sink_fmt' set but not used [-Wunused-but-set-variable]
    4673 |         struct v4l2_mbus_framefmt *isp_sink_fmt;
         |                                    ^~~~~~~~~~~~

vim +/input_config +1919 drivers/staging/media/atomisp/pci/atomisp_cmd.c

ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1910  
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1911  /*
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1912   * Function to get DVS2 BQ resolution settings
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1913   */
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1914  int atomisp_get_dvs2_bq_resolutions(struct atomisp_sub_device *asd,
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1915  				    struct atomisp_dvs2_bq_resolutions *bq_res)
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1916  {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1917  	struct ia_css_pipe_config *pipe_cfg = NULL;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1918  	struct ia_css_stream_config *stream_cfg = NULL;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19 @1919  	struct ia_css_stream_input_config *input_config = NULL;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1920  
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1921  	struct ia_css_stream *stream =
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1922  		    asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1923  	if (!stream) {
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1924  		dev_warn(asd->isp->dev, "stream is not created");
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1925  		return -EAGAIN;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1926  	}
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1927  
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1928  	pipe_cfg = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
c01d5546773e3a drivers/staging/media/atomisp/pci/atomisp_cmd.c          Mauro Carvalho Chehab 2020-05-21  1929  		   .pipe_configs[IA_CSS_PIPE_ID_VIDEO];
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1930  	stream_cfg = &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL]
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1931  		     .stream_config;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1932  	input_config = &stream_cfg->input_config;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1933  
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1934  	if (!bq_res)
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1935  		return -EINVAL;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1936  
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1937  	/* the GDC output resolution */
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1938  	bq_res->output_bq.width_bq = pipe_cfg->output_info[0].res.width / 2;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1939  	bq_res->output_bq.height_bq = pipe_cfg->output_info[0].res.height / 2;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1940  
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1941  	bq_res->envelope_bq.width_bq = 0;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1942  	bq_res->envelope_bq.height_bq = 0;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1943  	/* the GDC input resolution */
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1944  	bq_res->source_bq.width_bq = bq_res->output_bq.width_bq +
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1945  				     pipe_cfg->dvs_envelope.width / 2;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1946  	bq_res->source_bq.height_bq = bq_res->output_bq.height_bq +
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1947  				      pipe_cfg->dvs_envelope.height / 2;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1948  	/*
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1949  	 * Bad pixels caused by spatial filter processing
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1950  	 * ISP filter resolution should be given by CSS/FW, but for now
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1951  	 * there is not such API to query, and it is fixed value, so
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1952  	 * hardcoded here.
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1953  	 */
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1954  	bq_res->ispfilter_bq.width_bq = 12 / 2;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1955  	bq_res->ispfilter_bq.height_bq = 12 / 2;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1956  	/* spatial filter shift, always 4 pixels */
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1957  	bq_res->gdc_shift_bq.width_bq = 4 / 2;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1958  	bq_res->gdc_shift_bq.height_bq = 4 / 2;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1959  
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1960  	if (asd->params.video_dis_en) {
130cc40ea8b4d6 drivers/staging/media/atomisp/pci/atomisp_cmd.c          Hans de Goede         2023-02-21  1961  		bq_res->envelope_bq.width_bq = pipe_cfg->dvs_envelope.width / 2 -
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1962  					       bq_res->ispfilter_bq.width_bq;
130cc40ea8b4d6 drivers/staging/media/atomisp/pci/atomisp_cmd.c          Hans de Goede         2023-02-21  1963  		bq_res->envelope_bq.height_bq = pipe_cfg->dvs_envelope.height / 2 -
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1964  						bq_res->ispfilter_bq.height_bq;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1965  	}
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1966  
eaa399eb542cdf drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1967  	dev_dbg(asd->isp->dev,
eaa399eb542cdf drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1968  		"source_bq.width_bq %d, source_bq.height_bq %d,\nispfilter_bq.width_bq %d, ispfilter_bq.height_bq %d,\ngdc_shift_bq.width_bq %d, gdc_shift_bq.height_bq %d,\nenvelope_bq.width_bq %d, envelope_bq.height_bq %d,\noutput_bq.width_bq %d, output_bq.height_bq %d\n",
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1969  		bq_res->source_bq.width_bq, bq_res->source_bq.height_bq,
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1970  		bq_res->ispfilter_bq.width_bq, bq_res->ispfilter_bq.height_bq,
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1971  		bq_res->gdc_shift_bq.width_bq, bq_res->gdc_shift_bq.height_bq,
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1972  		bq_res->envelope_bq.width_bq, bq_res->envelope_bq.height_bq,
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1973  		bq_res->output_bq.width_bq, bq_res->output_bq.height_bq);
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1974  
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1975  	return 0;
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1976  }
ad85094b293e40 drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c Mauro Carvalho Chehab 2020-04-19  1977  
Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
#9 lore raw

PATCH 3/10 media: atomisp: Remove delayed_init related code

In reply to Hans de Goede

After the continues-mode removal the delayed-work never gets queues remove all the related code.

---
 .../media/atomisp/include/linux/atomisp.h     |  1 -
 .../staging/media/atomisp/pci/atomisp_cmd.c   | 35 -------------------
 .../staging/media/atomisp/pci/atomisp_cmd.h   |  1 -
 .../staging/media/atomisp/pci/atomisp_fops.c  |  1 -
 .../media/atomisp/pci/atomisp_internal.h      |  4 ---
 .../staging/media/atomisp/pci/atomisp_ioctl.c |  7 ----
 .../media/atomisp/pci/atomisp_subdev.c        |  1 -
 .../media/atomisp/pci/atomisp_subdev.h        |  6 ----
 .../staging/media/atomisp/pci/atomisp_v4l2.c  | 25 -------------
 9 files changed, 81 deletions(-)
drivers/staging/media/atomisp/include/linux/atomisp.h +0 -1
index 290a6ed7237e..b3cceea570ca 100644
@@ -1102,7 +1102,6 @@ struct atomisp_sensor_ae_bracketing_lut {
 
 #define V4L2_EVENT_ATOMISP_3A_STATS_READY   (V4L2_EVENT_PRIVATE_START + 1)
 #define V4L2_EVENT_ATOMISP_METADATA_READY   (V4L2_EVENT_PRIVATE_START + 2)
-#define V4L2_EVENT_ATOMISP_RAW_BUFFERS_ALLOC_DONE   (V4L2_EVENT_PRIVATE_START + 3)
 #define V4L2_EVENT_ATOMISP_ACC_COMPLETE     (V4L2_EVENT_PRIVATE_START + 4)
 #define V4L2_EVENT_ATOMISP_PAUSE_BUFFER	    (V4L2_EVENT_PRIVATE_START + 5)
 #define V4L2_EVENT_ATOMISP_CSS_RESET	    (V4L2_EVENT_PRIVATE_START + 6)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +0 -35
index fb8765fdefda..2af0de77c6ae 100644
@@ -1001,35 +1001,6 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
 		atomisp_qbuffers_to_css(asd);
 }
 
-void atomisp_delayed_init_work(struct work_struct *work)
-{
-	struct atomisp_sub_device *asd = container_of(work,
-					 struct atomisp_sub_device,
-					 delayed_init_work);
-	/*
-	 * to SOC camera, use yuvpp pipe and no support continuous mode.
-	 */
-	if (!ATOMISP_USE_YUVPP(asd)) {
-		struct v4l2_event event = {0};
-		struct ia_css_stream *stream;
-
-		stream = asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL].stream;
-
-
-		if (ia_css_alloc_continuous_frame_remain(stream))
-			return;
-
-		ia_css_update_continuous_frames(stream);
-
-		event.type = V4L2_EVENT_ATOMISP_RAW_BUFFERS_ALLOC_DONE;
-		v4l2_event_queue(asd->subdev.devnode, &event);
-	}
-
-	/* signal streamon after delayed init is done */
-	asd->delayed_init = ATOMISP_DELAYED_INIT_DONE;
-	complete(&asd->init_done);
-}
-
 static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 {
 	struct pci_dev *pdev = to_pci_dev(isp->dev);
@@ -1054,12 +1025,6 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 		    !asd->stream_prepared)
 			continue;
 
-		if (asd->delayed_init == ATOMISP_DELAYED_INIT_QUEUED)
-			cancel_work_sync(&asd->delayed_init_work);
-
-		complete(&asd->init_done);
-		asd->delayed_init = ATOMISP_DELAYED_INIT_NOT_QUEUED;
-
 		stream_restart[asd->index] = true;
 
 		spin_lock_irqsave(&isp->lock, flags);
drivers/staging/media/atomisp/pci/atomisp_cmd.h +0 -1
index bea950a128a9..d26593cc648e 100644
@@ -72,7 +72,6 @@ irqreturn_t atomisp_isr_thread(int irq, void *isp_ptr);
 const struct atomisp_format_bridge *get_atomisp_format_bridge_from_mbus(
     u32 mbus_code);
 bool atomisp_is_mbuscode_raw(uint32_t code);
-void atomisp_delayed_init_work(struct work_struct *work);
 
 /* Get internal fmt according to V4L2 fmt */
 bool atomisp_is_viewfinder_support(struct atomisp_device *isp);
drivers/staging/media/atomisp/pci/atomisp_fops.c +0 -1
index 280e8057676b..28649a522683 100644
@@ -614,7 +614,6 @@ static void atomisp_subdev_init_struct(struct atomisp_sub_device *asd)
 	/* s3a grid not enabled for any pipe */
 	asd->params.s3a_enabled_pipe = IA_CSS_PIPE_ID_NUM;
 
-	asd->delayed_init = ATOMISP_DELAYED_INIT_NOT_QUEUED;
 	/* Add for channel */
 	asd->input_curr = 0;
 
drivers/staging/media/atomisp/pci/atomisp_internal.h +0 -4
index 90caa4254893..7f346161c4b5 100644
@@ -101,10 +101,6 @@
 #define ATOMISP_METADATA_QUEUE_DEPTH_FOR_HAL	8
 #define ATOMISP_S3A_BUF_QUEUE_DEPTH_FOR_HAL	8
 
-#define ATOMISP_DELAYED_INIT_NOT_QUEUED	0
-#define ATOMISP_DELAYED_INIT_QUEUED	1
-#define ATOMISP_DELAYED_INIT_DONE	2
-
 /*
  * Define how fast CPU should be able to serve ISP interrupts.
  * The bigger the value, the higher risk that the ISP is not
drivers/staging/media/atomisp/pci/atomisp_ioctl.c +0 -7
index cb6324510aca..87e9b0b284d9 100644
@@ -1309,8 +1309,6 @@ int atomisp_start_streaming(struct vb2_queue *vq, unsigned int count)
 		goto out_unlock;
 	}
 
-	asd->delayed_init = ATOMISP_DELAYED_INIT_NOT_QUEUED;
-
 out_unlock:
 	mutex_unlock(&isp->mutex);
 	return ret;
@@ -1366,11 +1364,6 @@ void atomisp_stop_streaming(struct vb2_queue *vq)
 	atomisp_clear_css_buffer_counters(asd);
 	atomisp_css_irq_enable(isp, IA_CSS_IRQ_INFO_CSS_RECEIVER_SOF, false);
 
-	if (asd->delayed_init == ATOMISP_DELAYED_INIT_QUEUED) {
-		cancel_work_sync(&asd->delayed_init_work);
-		asd->delayed_init = ATOMISP_DELAYED_INIT_NOT_QUEUED;
-	}
-
 	css_pipe_id = atomisp_get_css_pipe_id(asd);
 	atomisp_css_stop(asd, css_pipe_id, false);
 
drivers/staging/media/atomisp/pci/atomisp_subdev.c +0 -1
index 821f3204b759..9f07ed9f5306 100644
@@ -189,7 +189,6 @@ static int isp_subdev_subscribe_event(struct v4l2_subdev *sd,
 	    sub->type != V4L2_EVENT_ATOMISP_METADATA_READY &&
 	    sub->type != V4L2_EVENT_ATOMISP_PAUSE_BUFFER &&
 	    sub->type != V4L2_EVENT_ATOMISP_CSS_RESET &&
-	    sub->type != V4L2_EVENT_ATOMISP_RAW_BUFFERS_ALLOC_DONE &&
 	    sub->type != V4L2_EVENT_ATOMISP_ACC_COMPLETE)
 		return -EINVAL;
 
drivers/staging/media/atomisp/pci/atomisp_subdev.h +0 -6
index 141b93a6c0be..5583d6a02346 100644
@@ -325,12 +325,6 @@ struct atomisp_sub_device {
 	 */
 	unsigned int index;
 
-	/* delayed memory allocation for css */
-	struct completion init_done;
-	struct workqueue_struct *delayed_init_workq;
-	unsigned int delayed_init;
-	struct work_struct delayed_init_work;
-
 	unsigned int latest_preview_exp_id; /* CSS ZSL/SDV raw buffer id */
 
 	unsigned int mipi_frame_size;
drivers/staging/media/atomisp/pci/atomisp_v4l2.c +0 -25
index e3672069877f..ce223fbb6640 100644
@@ -1083,27 +1083,6 @@ static int atomisp_register_entities(struct atomisp_device *isp)
 		}
 	}
 
-	for (i = 0; i < isp->num_of_streams; i++) {
-		struct atomisp_sub_device *asd = &isp->asd[i];
-
-		init_completion(&asd->init_done);
-
-		asd->delayed_init_workq =
-		    alloc_workqueue(isp->v4l2_dev.name, WQ_CPU_INTENSIVE,
-				    1);
-		if (!asd->delayed_init_workq) {
-			dev_err(isp->dev,
-				"Failed to initialize delayed init workq\n");
-			ret = -ENOMEM;
-
-			for (; i > 0; i--)
-				destroy_workqueue(isp->asd[i - 1].
-						  delayed_init_workq);
-			goto wq_alloc_failed;
-		}
-		INIT_WORK(&asd->delayed_init_work, atomisp_delayed_init_work);
-	}
-
 	for (i = 0; i < isp->input_cnt; i++) {
 		if (isp->inputs[i].port >= ATOMISP_CAMERA_NR_PORTS) {
 			dev_err(isp->dev, "isp->inputs port %d not supported\n",
@@ -1126,10 +1105,6 @@ static int atomisp_register_entities(struct atomisp_device *isp)
 	return 0;
 
 link_failed:
-	for (i = 0; i < isp->num_of_streams; i++)
-		destroy_workqueue(isp->asd[i].
-				  delayed_init_workq);
-wq_alloc_failed:
 	for (i = 0; i < isp->num_of_streams; i++)
 		atomisp_subdev_unregister_entities(
 		    &isp->asd[i]);
Signature · 1 line
2.39.1
#10 lore raw

PATCH 4/10 media: atomisp: Remove crop_needs_override from atomisp_set_fmt()

In reply to Hans de Goede

Remove the crop_needs_override local helper variable from atomisp_set_fmt(), as it always is true now.

---
 .../staging/media/atomisp/pci/atomisp_cmd.c   | 48 +++++++++----------
 1 file changed, 23 insertions(+), 25 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +23 -25
index 2af0de77c6ae..22b8e13e9c2e 100644
@@ -4634,7 +4634,6 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
 	struct v4l2_pix_format backup_fmt, s_fmt;
 	unsigned int dvs_env_w = 0, dvs_env_h = 0;
 	unsigned int padding_w = pad_w, padding_h = pad_h;
-	bool res_overflow = false, crop_needs_override = false;
 	struct v4l2_mbus_framefmt *isp_sink_fmt;
 	struct v4l2_mbus_framefmt isp_source_fmt = {0};
 	struct v4l2_subdev_format vformat = {
@@ -4642,6 +4641,7 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
 	};
 	struct v4l2_rect isp_sink_crop;
 	u16 source_pad = atomisp_subdev_source_pad(vdev);
+	bool res_overflow = false;
 	struct v4l2_subdev_fh fh;
 	int ret;
 
@@ -4855,7 +4855,6 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
 	}
 
 	atomisp_csi_lane_config(isp);
-	crop_needs_override = true;
 
 	atomisp_check_copy_mode(asd, source_pad, &backup_fmt);
 	asd->yuvpp_mode = false;			/* Reset variable */
@@ -4917,30 +4916,29 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
 		 * which appears to be related by a hardware
 		 * performance limitation.  It's unclear why this
 		 * particular code triggers the issue. */
-		if (crop_needs_override) {
-			if (isp_sink_crop.width * main_compose.height >
-			    isp_sink_crop.height * main_compose.width) {
-				sink_crop.height = isp_sink_crop.height;
-				sink_crop.width = DIV_NEAREST_STEP(
-						      sink_crop.height *
-						      f->fmt.pix.width,
-						      f->fmt.pix.height,
-						      ATOM_ISP_STEP_WIDTH);
-			} else {
-				sink_crop.width = isp_sink_crop.width;
-				sink_crop.height = DIV_NEAREST_STEP(
-						       sink_crop.width *
-						       f->fmt.pix.height,
-						       f->fmt.pix.width,
-						       ATOM_ISP_STEP_HEIGHT);
-			}
-			atomisp_subdev_set_selection(&asd->subdev, fh.state,
-						     V4L2_SUBDEV_FORMAT_ACTIVE,
-						     ATOMISP_SUBDEV_PAD_SINK,
-						     V4L2_SEL_TGT_CROP,
-						     V4L2_SEL_FLAG_KEEP_CONFIG,
-						     &sink_crop);
+		if (isp_sink_crop.width * main_compose.height >
+		    isp_sink_crop.height * main_compose.width) {
+			sink_crop.height = isp_sink_crop.height;
+			sink_crop.width = DIV_NEAREST_STEP(
+					      sink_crop.height *
+					      f->fmt.pix.width,
+					      f->fmt.pix.height,
+					      ATOM_ISP_STEP_WIDTH);
+		} else {
+			sink_crop.width = isp_sink_crop.width;
+			sink_crop.height = DIV_NEAREST_STEP(
+					       sink_crop.width *
+					       f->fmt.pix.height,
+					       f->fmt.pix.width,
+					       ATOM_ISP_STEP_HEIGHT);
 		}
+		atomisp_subdev_set_selection(&asd->subdev, fh.state,
+					     V4L2_SUBDEV_FORMAT_ACTIVE,
+					     ATOMISP_SUBDEV_PAD_SINK,
+					     V4L2_SEL_TGT_CROP,
+					     V4L2_SEL_FLAG_KEEP_CONFIG,
+					     &sink_crop);
+
 		atomisp_subdev_set_selection(&asd->subdev, fh.state,
 					     V4L2_SUBDEV_FORMAT_ACTIVE,
 					     source_pad,
Signature · 1 line
2.39.1
maintainer
#11 lore raw

Re: [PATCH 04/10] media: atomisp: Remove crop_needs_override from atomisp_set_fmt()

Quoted 2 lines · Hans de Goede

Remove the crop_needs_override local helper variable from atomisp_set_fmt(), as it always is true now.

...

drivers/staging/media/atomisp/pci/atomisp_cmd.c int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f) · line 4926

Quoted 5 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +5 -0
+			sink_crop.width = DIV_NEAREST_STEP(
+					      sink_crop.height *
+					      f->fmt.pix.width,
+					      f->fmt.pix.height,
+					      ATOM_ISP_STEP_WIDTH);

Not sure how long this code stays, I would indent it as

			sink_crop.width =
				DIV_NEAREST_STEP(sink_crop.height *
						 f->fmt.pix.width,
						 f->fmt.pix.height,
						 ATOM_ISP_STEP_WIDTH);

...

drivers/staging/media/atomisp/pci/atomisp_cmd.c int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f) · line 4933

Quoted 5 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +5 -0
+			sink_crop.height = DIV_NEAREST_STEP(
+					       sink_crop.width *
+					       f->fmt.pix.height,
+					       f->fmt.pix.width,
+					       ATOM_ISP_STEP_HEIGHT);

Ditto.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#12 lore raw

Re: [PATCH 04/10] media: atomisp: Remove crop_needs_override from atomisp_set_fmt()

Hi,

Quoted 14 lines · Andy Shevchenko
Quoted 2 lines · Hans de Goede

Remove the crop_needs_override local helper variable from atomisp_set_fmt(), as it always is true now.

...

drivers/staging/media/atomisp/pci/atomisp_cmd.c int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f) · line 4926

Quoted 5 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +5 -0
+			sink_crop.width = DIV_NEAREST_STEP(
+					      sink_crop.height *
+					      f->fmt.pix.width,
+					      f->fmt.pix.height,
+					      ATOM_ISP_STEP_WIDTH);

Not sure how long this code stays, I would indent it as

Quoted 5 lines
			sink_crop.width =
				DIV_NEAREST_STEP(sink_crop.height *
						 f->fmt.pix.width,
						 f->fmt.pix.height,
						 ATOM_ISP_STEP_WIDTH);

Thanks, I've gone with:

			sink_crop.width =
				DIV_NEAREST_STEP(sink_crop.height * f->fmt.pix.width,
						 f->fmt.pix.height,
						 ATOM_ISP_STEP_WIDTH);

Keeping the first DIV_NEAREST_STEP() argument on a single line.

Quoted 10 lines

...

drivers/staging/media/atomisp/pci/atomisp_cmd.c int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f) · line 4933

Quoted 5 lines
drivers/staging/media/atomisp/pci/atomisp_cmd.c +5 -0
+			sink_crop.height = DIV_NEAREST_STEP(
+					       sink_crop.width *
+					       f->fmt.pix.height,
+					       f->fmt.pix.width,
+					       ATOM_ISP_STEP_HEIGHT);

Ditto.

Ditto :)

Regards,

Hans

#13 lore raw

PATCH 5/10 media: atomisp: Remove atomisp_css_enable_raw_binning()

In reply to Hans de Goede

Remove the now unused atomisp_css_enable_raw_binning() function.

---
 .../media/atomisp/pci/atomisp_compat.h        |  3 ---
 .../media/atomisp/pci/atomisp_compat_css20.c  | 19 -------------------
 2 files changed, 22 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_compat.h +0 -3
index 7316eb9f974a..06d54c9bcb49 100644
@@ -196,9 +196,6 @@ void atomisp_css_input_set_two_pixels_per_clock(
     struct atomisp_sub_device *asd,
     bool two_ppc);
 
-void atomisp_css_enable_raw_binning(struct atomisp_sub_device *asd,
-				    bool enable);
-
 void atomisp_css_enable_dz(struct atomisp_sub_device *asd, bool enable);
 
 void atomisp_css_capture_set_mode(struct atomisp_sub_device *asd,
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +0 -19
index accae44ad72b..914af04e9211 100644
@@ -1728,25 +1728,6 @@ void atomisp_css_input_set_two_pixels_per_clock(
 		.update_pipe[i] = true;
 }
 
-void atomisp_css_enable_raw_binning(struct atomisp_sub_device *asd,
-				    bool enable)
-{
-	struct atomisp_stream_env *stream_env =
-		    &asd->stream_env[ATOMISP_INPUT_STREAM_GENERAL];
-	unsigned int pipe;
-
-	if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO)
-		pipe = IA_CSS_PIPE_ID_VIDEO;
-	else
-		pipe = IA_CSS_PIPE_ID_PREVIEW;
-
-	stream_env->pipe_extra_configs[pipe].enable_raw_binning = enable;
-	stream_env->update_pipe[pipe] = true;
-	if (enable)
-		stream_env->pipe_configs[pipe].output_info[0].padded_width =
-		    stream_env->stream_config.input_config.effective_res.width;
-}
-
 void atomisp_css_enable_dz(struct atomisp_sub_device *asd, bool enable)
 {
 	int i;
Signature · 1 line
2.39.1
#14 lore raw

PATCH 6/10 media: atomisp: Remove atomisp_get_metadata_type()

In reply to Hans de Goede

atomisp_get_metadata_type() always returns ATOMISP_MAIN_METADATA, replace its uses with ATOMISP_MAIN_METADATA and remove it.

---
 drivers/staging/media/atomisp/pci/atomisp_cmd.c  | 9 +--------
 drivers/staging/media/atomisp/pci/atomisp_cmd.h  | 5 -----
 drivers/staging/media/atomisp/pci/atomisp_fops.c | 3 +--
 3 files changed, 2 insertions(+), 15 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -8
index 22b8e13e9c2e..2c73af9f039f 100644
@@ -728,13 +728,6 @@ static void atomisp_recover_params_queue(struct atomisp_video_pipe *pipe)
 	atomisp_handle_parameter_and_buffer(pipe);
 }
 
-enum atomisp_metadata_type
-atomisp_get_metadata_type(struct atomisp_sub_device *asd,
-			  enum ia_css_pipe_id pipe_id)
-{
-	return ATOMISP_MAIN_METADATA;
-}
-
 void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
 		      enum ia_css_buffer_type buf_type,
 		      enum ia_css_pipe_id css_pipe_id,
@@ -806,7 +799,7 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
 		if (error)
 			break;
 
-		md_type = atomisp_get_metadata_type(asd, css_pipe_id);
+		md_type = ATOMISP_MAIN_METADATA;
 		list_for_each_entry_safe(md_iter, _md_buf_tmp,
 					 &asd->metadata_in_css[md_type], list) {
 			if (md_iter->metadata ==
drivers/staging/media/atomisp/pci/atomisp_cmd.h +0 -5
index d26593cc648e..399b549bcf83 100644
@@ -313,11 +313,6 @@ void atomisp_init_raw_buffer_bitmap(struct atomisp_sub_device *asd);
 int atomisp_enable_dz_capt_pipe(struct atomisp_sub_device *asd,
 				unsigned int *enable);
 
-/* Function to get metadata type bu pipe id */
-enum atomisp_metadata_type
-atomisp_get_metadata_type(struct atomisp_sub_device *asd,
-			  enum ia_css_pipe_id pipe_id);
-
 u32 atomisp_get_pixel_depth(u32 pixelformat);
 
 /* Function for HAL to inject a fake event to wake up poll thread */
drivers/staging/media/atomisp/pci/atomisp_fops.c +1 -2
index 28649a522683..55c9ff87c112 100644
@@ -112,8 +112,7 @@ static int atomisp_q_one_metadata_buffer(struct atomisp_sub_device *asd,
 	enum ia_css_pipe_id css_pipe_id)
 {
 	struct atomisp_metadata_buf *metadata_buf;
-	enum atomisp_metadata_type md_type =
-	    atomisp_get_metadata_type(asd, css_pipe_id);
+	enum atomisp_metadata_type md_type = ATOMISP_MAIN_METADATA;
 	struct list_head *metadata_list;
 
 	if (asd->metadata_bufs_in_css[stream_id][css_pipe_id] >=
Signature · 1 line
2.39.1
#15 lore raw

PATCH 7/10 media: atomisp: Remove unused SOC_CAMERA, XENON_FLASH and FILE_INPUT subdev types

In reply to Hans de Goede

Nothing registers subdevs with the SOC_CAMERA, XENON_FLASH and FILE_INPUT types, remove the code for these.

---
 .../atomisp/include/linux/atomisp_platform.h  |  9 +++------
 .../staging/media/atomisp/pci/atomisp_cmd.c   | 20 ++-----------------
 .../media/atomisp/pci/atomisp_compat_css20.c  | 13 ++----------
 .../staging/media/atomisp/pci/atomisp_fops.c  |  6 ++----
 .../media/atomisp/pci/atomisp_internal.h      | 12 +----------
 .../media/atomisp/pci/atomisp_subdev.c        |  9 ---------
 .../staging/media/atomisp/pci/atomisp_v4l2.c  | 10 ++--------
 7 files changed, 12 insertions(+), 67 deletions(-)
drivers/staging/media/atomisp/include/linux/atomisp_platform.h +3 -6
index 539b21d39d3b..b77bf814a5a6 100644
@@ -111,12 +111,9 @@ enum atomisp_input_format {
 
 enum intel_v4l2_subdev_type {
 	RAW_CAMERA = 1,
-	SOC_CAMERA = 2,
-	CAMERA_MOTOR = 3,
-	LED_FLASH = 4,
-	XENON_FLASH = 5,
-	FILE_INPUT = 6,
-	TEST_PATTERN = 7,
+	CAMERA_MOTOR = 2,
+	LED_FLASH = 3,
+	TEST_PATTERN = 4,
 };
 
 struct intel_v4l2_subdev_id {
drivers/staging/media/atomisp/pci/atomisp_cmd.c +2 -18
index 2c73af9f039f..e4519cab8b5e 100644
@@ -1068,9 +1068,7 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
 		if (!stream_restart[i])
 			continue;
 
-		if (isp->inputs[asd->input_curr].type != FILE_INPUT)
-			atomisp_css_input_set_mode(asd,
-						   IA_CSS_INPUT_MODE_BUFFERED_SENSOR);
+		atomisp_css_input_set_mode(asd, IA_CSS_INPUT_MODE_BUFFERED_SENSOR);
 
 		css_pipe_id = atomisp_get_css_pipe_id(asd);
 		if (atomisp_css_start(asd, css_pipe_id, true)) {
@@ -4269,8 +4267,7 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
 	if (!format)
 		return -EINVAL;
 
-	if (isp->inputs[asd->input_curr].type != TEST_PATTERN &&
-	    isp->inputs[asd->input_curr].type != FILE_INPUT) {
+	if (isp->inputs[asd->input_curr].type != TEST_PATTERN) {
 		mipi_info = atomisp_to_sensor_mipi_info(
 				isp->inputs[asd->input_curr].camera);
 		if (!mipi_info) {
@@ -4371,13 +4368,6 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
 		configure_pp_input = atomisp_css_preview_configure_pp_input;
 		pipe_id = IA_CSS_PIPE_ID_PREVIEW;
 	} else {
-		/* CSS doesn't support low light mode on SOC cameras, so disable
-		 * it. FIXME: if this is done elsewhere, it gives corrupted
-		 * colors into thumbnail image.
-		 */
-		if (isp->inputs[asd->input_curr].type == SOC_CAMERA)
-			asd->params.low_light = false;
-
 		if (format->sh_fmt == IA_CSS_FRAME_FORMAT_RAW) {
 			atomisp_css_capture_set_mode(asd, IA_CSS_CAPTURE_MODE_RAW);
 			atomisp_css_enable_dz(asd, false);
@@ -4468,12 +4458,6 @@ static void atomisp_get_dis_envelop(struct atomisp_sub_device *asd,
 				    unsigned int width, unsigned int height,
 				    unsigned int *dvs_env_w, unsigned int *dvs_env_h)
 {
-	struct atomisp_device *isp = asd->isp;
-
-	/* if subdev type is SOC camera,we do not need to set DVS */
-	if (isp->inputs[asd->input_curr].type == SOC_CAMERA)
-		asd->params.video_dis_en = false;
-
 	if (asd->params.video_dis_en &&
 	    asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
 		/* envelope is 20% of the output resolution */
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +2 -11
index 914af04e9211..e8e39d0e412e 100644
@@ -590,8 +590,6 @@ static void __apply_additional_pipe_config(
 		.enable_reduced_pipe = true;
 		stream_env->pipe_configs[pipe_id]
 		.enable_dz = false;
-		if (ATOMISP_SOC_CAMERA(asd))
-			stream_env->pipe_configs[pipe_id].enable_dz = true;
 
 		if (asd->params.video_dis_en) {
 			stream_env->pipe_extra_configs[pipe_id]
@@ -605,10 +603,7 @@ static void __apply_additional_pipe_config(
 		break;
 	case IA_CSS_PIPE_ID_YUVPP:
 	case IA_CSS_PIPE_ID_COPY:
-		if (ATOMISP_SOC_CAMERA(asd))
-			stream_env->pipe_configs[pipe_id].enable_dz = true;
-		else
-			stream_env->pipe_configs[pipe_id].enable_dz = false;
+		stream_env->pipe_configs[pipe_id].enable_dz = false;
 		break;
 	default:
 		break;
@@ -2563,13 +2558,9 @@ int atomisp_get_css_frame_info(struct atomisp_sub_device *asd,
 	int stream_index;
 	struct atomisp_device *isp = asd->isp;
 
-	if (ATOMISP_SOC_CAMERA(asd)) {
-		stream_index = ATOMISP_INPUT_STREAM_GENERAL;
-	} else {
-		stream_index = (pipe_index == IA_CSS_PIPE_ID_YUVPP) ?
+	stream_index = (pipe_index == IA_CSS_PIPE_ID_YUVPP) ?
 			       ATOMISP_INPUT_STREAM_VIDEO :
 			       ATOMISP_INPUT_STREAM_GENERAL;
-	}
 
 	if (0 != ia_css_pipe_get_info(asd->stream_env[stream_index]
 		.pipes[pipe_index], &info)) {
drivers/staging/media/atomisp/pci/atomisp_fops.c +2 -4
index 55c9ff87c112..e5203f68f0f9 100644
@@ -458,10 +458,8 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
 		buf_type = atomisp_get_css_buf_type(
 			       asd, css_preview_pipe_id,
 			       atomisp_subdev_source_pad(&preview_pipe->vdev));
-		if (ATOMISP_SOC_CAMERA(asd) && css_preview_pipe_id == IA_CSS_PIPE_ID_YUVPP)
-			input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
-		/* else for ext isp use case */
-		else if (css_preview_pipe_id == IA_CSS_PIPE_ID_YUVPP)
+
+		if (css_preview_pipe_id == IA_CSS_PIPE_ID_YUVPP)
 			input_stream_id = ATOMISP_INPUT_STREAM_VIDEO;
 		else if (asd->stream_env[ATOMISP_INPUT_STREAM_PREVIEW].stream)
 			input_stream_id = ATOMISP_INPUT_STREAM_PREVIEW;
drivers/staging/media/atomisp/pci/atomisp_internal.h +1 -11
index 7f346161c4b5..1c1c4cf41e32 100644
@@ -117,17 +117,7 @@
 #define ATOMISP_CSS_OUTPUT_SECOND_INDEX     1
 #define ATOMISP_CSS_OUTPUT_DEFAULT_INDEX    0
 
-/*
- * ATOMISP_SOC_CAMERA
- * This is to differentiate between ext-isp and soc camera in
- * Moorefield/Baytrail platform.
- */
-#define ATOMISP_SOC_CAMERA(asd)  \
-	(asd->isp->inputs[asd->input_curr].type == SOC_CAMERA)
-
-#define ATOMISP_USE_YUVPP(asd)  \
-	(ATOMISP_SOC_CAMERA(asd) && ATOMISP_CSS_SUPPORT_YUVPP && \
-	!asd->copy_mode)
+#define ATOMISP_USE_YUVPP(asd)		false
 
 /* ISP2401 */
 #define ATOMISP_ION_DEVICE_FD_OFFSET   16
drivers/staging/media/atomisp/pci/atomisp_subdev.c +0 -9
index 9f07ed9f5306..371991883076 100644
@@ -409,11 +409,6 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
 			padding_h = 12;
 		}
 
-		if (isp->inputs[isp_sd->input_curr].type == SOC_CAMERA) {
-			padding_w = 0;
-			padding_h = 0;
-		}
-
 		if (atomisp_subdev_format_conversion(isp_sd,
 						     isp_sd->capture_pad)
 		    && crop[pad]->width && crop[pad]->height) {
@@ -421,10 +416,6 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
 			crop[pad]->height -= padding_h;
 		}
 
-		/* if subdev type is SOC camera,we do not need to set DVS */
-		if (isp->inputs[isp_sd->input_curr].type == SOC_CAMERA)
-			isp_sd->params.video_dis_en = 0;
-
 		if (isp_sd->params.video_dis_en &&
 		    isp_sd->run_mode->val == ATOMISP_RUN_MODE_VIDEO) {
 			/* This resolution contains 20 % of DVS slack
drivers/staging/media/atomisp/pci/atomisp_v4l2.c +2 -8
index ce223fbb6640..4f5698e54711 100644
@@ -842,8 +842,7 @@ int atomisp_csi_lane_config(struct atomisp_device *isp)
 	for (i = 0; i < isp->input_cnt; i++) {
 		struct camera_mipi_info *mipi_info;
 
-		if (isp->inputs[i].type != RAW_CAMERA &&
-		    isp->inputs[i].type != SOC_CAMERA)
+		if (isp->inputs[i].type != RAW_CAMERA)
 			continue;
 
 		mipi_info = atomisp_to_sensor_mipi_info(isp->inputs[i].camera);
@@ -923,8 +922,7 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
 		int camera_count = 0;
 
 		for (subdevs = pdata->subdevs; subdevs->type; ++subdevs) {
-			if (subdevs->type == RAW_CAMERA ||
-			    subdevs->type == SOC_CAMERA)
+			if (subdevs->type == RAW_CAMERA)
 				camera_count++;
 		}
 		if (camera_count)
@@ -945,9 +943,6 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
 		case RAW_CAMERA:
 			dev_dbg(isp->dev, "raw_index: %d\n", raw_index);
 			raw_index = isp->input_cnt;
-			fallthrough;
-		case SOC_CAMERA:
-			dev_dbg(isp->dev, "SOC_INDEX: %d\n", isp->input_cnt);
 			if (isp->input_cnt >= ATOM_ISP_MAX_INPUTS) {
 				dev_warn(isp->dev,
 					 "too many atomisp inputs, ignored\n");
@@ -974,7 +969,6 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
 			isp->motor = subdevs->subdev;
 			break;
 		case LED_FLASH:
-		case XENON_FLASH:
 			if (isp->flash) {
 				dev_warn(isp->dev, "too many atomisp flash devices\n");
 				continue;
Signature · 1 line
2.39.1
#16 lore raw

PATCH 8/10 media: atomisp: Remove ATOMISP_USE_YUVPP()

In reply to Hans de Goede

ATOMISP_USE_YUVPP() always returns false, so remove it and remove any code-paths which only run when it would return true.

---
 .../staging/media/atomisp/pci/atomisp_cmd.c   |  15 +-
 .../media/atomisp/pci/atomisp_compat_css20.c  | 215 ++----------------
 .../staging/media/atomisp/pci/atomisp_fops.c  |  33 ---
 .../media/atomisp/pci/atomisp_internal.h      |   2 -
 .../staging/media/atomisp/pci/atomisp_ioctl.c |   3 -
 5 files changed, 21 insertions(+), 247 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +1 -14
index e4519cab8b5e..2b95d8f0dbd2 100644
@@ -196,7 +196,6 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
 			 enum atomisp_dfs_mode mode,
 			 bool force)
 {
-	struct pci_dev *pdev = to_pci_dev(isp->dev);
 	/* FIXME! Only use subdev[0] status yet */
 	struct atomisp_sub_device *asd = &isp->asd[0];
 	const struct atomisp_dfs_config *dfs;
@@ -205,10 +204,6 @@ int atomisp_freq_scaling(struct atomisp_device *isp,
 	int i, ret;
 	unsigned short fps = 0;
 
-	if ((pdev->device & ATOMISP_PCI_DEVICE_SOC_MASK) ==
-	    ATOMISP_PCI_DEVICE_SOC_CHT && ATOMISP_USE_YUVPP(asd))
-		isp->dfs = &dfs_config_cht_soc;
-
 	dfs = isp->dfs;
 
 	if (dfs->lowest_freq == 0 || dfs->max_freq_at_vmin == 0 ||
@@ -4398,12 +4393,6 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
 		}
 	}
 
-	/*
-	 * to SOC camera, use yuvpp pipe.
-	 */
-	if (ATOMISP_USE_YUVPP(asd))
-		pipe_id = IA_CSS_PIPE_ID_YUVPP;
-
 	if (asd->copy_mode)
 		ret = atomisp_css_copy_configure_output(asd, ATOMISP_INPUT_STREAM_GENERAL,
 							pix->width, pix->height,
@@ -5282,9 +5271,7 @@ static int atomisp_get_pipe_id(struct atomisp_video_pipe *pipe)
 		return -EINVAL;
 	}
 
-	if (ATOMISP_USE_YUVPP(asd)) {
-		return IA_CSS_PIPE_ID_YUVPP;
-	} else if (asd->vfpp->val == ATOMISP_VFPP_DISABLE_SCALER) {
+	if (asd->vfpp->val == ATOMISP_VFPP_DISABLE_SCALER) {
 		return IA_CSS_PIPE_ID_VIDEO;
 	} else if (asd->vfpp->val == ATOMISP_VFPP_DISABLE_LOWLAT) {
 		return IA_CSS_PIPE_ID_CAPTURE;
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +20 -195

335 lines not on this page · raw message

drivers/staging/media/atomisp/pci/atomisp_fops.c +0 -33
index e5203f68f0f9..5ba5739c144b 100644
@@ -346,16 +346,6 @@ static int atomisp_get_css_buf_type(struct atomisp_sub_device *asd,
 				    enum ia_css_pipe_id pipe_id,
 				    uint16_t source_pad)
 {
-	if (ATOMISP_USE_YUVPP(asd)) {
-		if (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE ||
-		    source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VIDEO ||
-		    (source_pad == ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW &&
-		     asd->run_mode->val != ATOMISP_RUN_MODE_VIDEO))
-			return IA_CSS_BUFFER_TYPE_OUTPUT_FRAME;
-		else
-			return IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME;
-	}
-
 	if (pipe_id == IA_CSS_PIPE_ID_COPY ||
 	    source_pad == ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE ||
 	    source_pad == ATOMISP_SUBDEV_PAD_SOURCE_VIDEO ||
@@ -424,12 +414,6 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
 			       atomisp_subdev_source_pad(&capture_pipe->vdev));
 		input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
 
-		/*
-		 * use yuvpp pipe for SOC camera.
-		 */
-		if (ATOMISP_USE_YUVPP(asd))
-			css_capture_pipe_id = IA_CSS_PIPE_ID_YUVPP;
-
 		atomisp_q_video_buffers_to_css(asd, capture_pipe,
 					       input_stream_id,
 					       buf_type, css_capture_pipe_id);
@@ -444,11 +428,6 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
 		else
 			input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
 
-		/*
-		 * use yuvpp pipe for SOC camera.
-		 */
-		if (ATOMISP_USE_YUVPP(asd))
-			css_capture_pipe_id = IA_CSS_PIPE_ID_YUVPP;
 		atomisp_q_video_buffers_to_css(asd, vf_pipe,
 					       input_stream_id,
 					       buf_type, css_capture_pipe_id);
@@ -466,12 +445,6 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
 		else
 			input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
 
-		/*
-		 * use yuvpp pipe for SOC camera.
-		 */
-		if (ATOMISP_USE_YUVPP(asd))
-			css_preview_pipe_id = IA_CSS_PIPE_ID_YUVPP;
-
 		atomisp_q_video_buffers_to_css(asd, preview_pipe,
 					       input_stream_id,
 					       buf_type, css_preview_pipe_id);
@@ -486,12 +459,6 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
 		else
 			input_stream_id = ATOMISP_INPUT_STREAM_GENERAL;
 
-		/*
-		 * use yuvpp pipe for SOC camera.
-		 */
-		if (ATOMISP_USE_YUVPP(asd))
-			css_video_pipe_id = IA_CSS_PIPE_ID_YUVPP;
-
 		atomisp_q_video_buffers_to_css(asd, video_pipe,
 					       input_stream_id,
 					       buf_type, css_video_pipe_id);
drivers/staging/media/atomisp/pci/atomisp_internal.h +0 -2
index 1c1c4cf41e32..681a9258288d 100644
@@ -117,8 +117,6 @@
 #define ATOMISP_CSS_OUTPUT_SECOND_INDEX     1
 #define ATOMISP_CSS_OUTPUT_DEFAULT_INDEX    0
 
-#define ATOMISP_USE_YUVPP(asd)		false
-
 /* ISP2401 */
 #define ATOMISP_ION_DEVICE_FD_OFFSET   16
 #define ATOMISP_ION_SHARED_FD_MASK     (0xFFFF)
drivers/staging/media/atomisp/pci/atomisp_ioctl.c +0 -3
index 87e9b0b284d9..99cfe8a80bb1 100644
@@ -1120,9 +1120,6 @@ static int atomisp_dqbuf_wrapper(struct file *file, void *fh, struct v4l2_buffer
 
 enum ia_css_pipe_id atomisp_get_css_pipe_id(struct atomisp_sub_device *asd)
 {
-	if (ATOMISP_USE_YUVPP(asd))
-		return IA_CSS_PIPE_ID_YUVPP;
-
 	/*
 	 * Disable vf_pp and run CSS in video mode. This allows using ISP
 	 * scaling but it has one frame delay due to CSS internal buffering.
Signature · 1 line
2.39.1
#17 lore raw

PATCH 9/10 media: atomisp: Remove yuvpp_mode

In reply to Hans de Goede

yuvpp_mode is never set, so it always is false remove it.

---
 drivers/staging/media/atomisp/pci/atomisp_cmd.c        |  1 -
 .../staging/media/atomisp/pci/atomisp_compat_css20.c   |  4 ----
 drivers/staging/media/atomisp/pci/atomisp_fops.c       | 10 ----------
 drivers/staging/media/atomisp/pci/atomisp_subdev.h     |  1 -
 4 files changed, 16 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +0 -1
index 2b95d8f0dbd2..937cfe9489fc 100644
@@ -4823,7 +4823,6 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
 	atomisp_csi_lane_config(isp);
 
 	atomisp_check_copy_mode(asd, source_pad, &backup_fmt);
-	asd->yuvpp_mode = false;			/* Reset variable */
 
 	isp_sink_crop = *atomisp_subdev_get_rect(&asd->subdev, NULL,
 			V4L2_SUBDEV_FORMAT_ACTIVE,
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +0 -4
index 8bd7605fbe8f..10be77c478b8 100644
@@ -2435,8 +2435,6 @@ static unsigned int atomisp_get_pipe_index(struct atomisp_sub_device *asd,
 
 	switch (source_pad) {
 	case ATOMISP_SUBDEV_PAD_SOURCE_VIDEO:
-		if (asd->yuvpp_mode)
-			return IA_CSS_PIPE_ID_YUVPP;
 		if (asd->copy_mode)
 			return IA_CSS_PIPE_ID_COPY;
 		if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO
@@ -2455,8 +2453,6 @@ static unsigned int atomisp_get_pipe_index(struct atomisp_sub_device *asd,
 		}
 		fallthrough;
 	case ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW:
-		if (asd->yuvpp_mode)
-			return IA_CSS_PIPE_ID_YUVPP;
 		if (asd->copy_mode)
 			return IA_CSS_PIPE_ID_COPY;
 		if (asd->run_mode->val == ATOMISP_RUN_MODE_VIDEO)
drivers/staging/media/atomisp/pci/atomisp_fops.c +0 -10
index 5ba5739c144b..d8d4c412f66a 100644
@@ -399,15 +399,6 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
 		css_video_pipe_id = IA_CSS_PIPE_ID_COPY;
 	}
 
-	if (asd->yuvpp_mode) {
-		capture_pipe = &asd->video_out_capture;
-		video_pipe   = &asd->video_out_video_capture;
-		preview_pipe = &asd->video_out_preview;
-		css_capture_pipe_id = IA_CSS_PIPE_ID_COPY;
-		css_video_pipe_id   = IA_CSS_PIPE_ID_YUVPP;
-		css_preview_pipe_id = IA_CSS_PIPE_ID_YUVPP;
-	}
-
 	if (capture_pipe) {
 		buf_type = atomisp_get_css_buf_type(
 			       asd, css_capture_pipe_id,
@@ -583,7 +574,6 @@ static void atomisp_subdev_init_struct(struct atomisp_sub_device *asd)
 
 	asd->mipi_frame_size = 0;
 	asd->copy_mode = false;
-	asd->yuvpp_mode = false;
 
 	asd->stream_prepared = false;
 	asd->high_speed_mode = false;
drivers/staging/media/atomisp/pci/atomisp_subdev.h +0 -1
index 5583d6a02346..df6e2a8c5f84 100644
@@ -330,7 +330,6 @@ struct atomisp_sub_device {
 	unsigned int mipi_frame_size;
 
 	bool copy_mode; /* CSI2+ use copy mode */
-	bool yuvpp_mode;	/* CSI2+ yuvpp pipe */
 
 	int raw_buffer_bitmap[ATOMISP_MAX_EXP_ID / 32 +
 						 1]; /* Record each Raw Buffer lock status */
Signature · 1 line
2.39.1
#18 lore raw

PATCH 10/10 media: atomisp: Remove online_process setting

In reply to Hans de Goede

online_process is always true, remove it.

---
 .../staging/media/atomisp/pci/atomisp_cmd.c   | 30 ++-----------------
 .../media/atomisp/pci/atomisp_compat.h        |  4 ---
 .../media/atomisp/pci/atomisp_compat_css20.c  |  8 -----
 .../staging/media/atomisp/pci/atomisp_fops.c  |  1 -
 .../media/atomisp/pci/atomisp_subdev.h        |  4 ---
 5 files changed, 3 insertions(+), 44 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +3 -27
index 937cfe9489fc..b8112721f0a7 100644
@@ -1622,11 +1622,6 @@ int atomisp_formats(struct atomisp_sub_device *asd, int flag,
 void atomisp_free_internal_buffers(struct atomisp_sub_device *asd)
 {
 	atomisp_free_css_parameters(&asd->params.css_param);
-
-	if (asd->raw_output_frame) {
-		ia_css_frame_free(asd->raw_output_frame);
-		asd->raw_output_frame = NULL;
-	}
 }
 
 static void atomisp_update_grid_info(struct atomisp_sub_device *asd,
@@ -4221,7 +4216,6 @@ static int css_input_resolution_changed(struct atomisp_sub_device *asd,
 
 static int atomisp_set_fmt_to_isp(struct video_device *vdev,
 				  struct ia_css_frame_info *output_info,
-				  struct ia_css_frame_info *raw_output_info,
 				  struct v4l2_pix_format *pix,
 				  unsigned int source_pad)
 {
@@ -4372,20 +4366,13 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
 
 		/* in case of ANR, force capture pipe to offline mode */
 		atomisp_css_capture_enable_online(asd, ATOMISP_INPUT_STREAM_GENERAL,
-						  asd->params.low_light ?
-						  false : asd->params.online_process);
+						  !asd->params.low_light);
 
 		configure_output = atomisp_css_capture_configure_output;
 		get_frame_info = atomisp_css_capture_get_output_frame_info;
 		configure_pp_input = atomisp_css_capture_configure_pp_input;
 		pipe_id = IA_CSS_PIPE_ID_CAPTURE;
 
-		if (!asd->params.online_process) {
-			ret = atomisp_css_capture_get_output_raw_frame_info(asd,
-				raw_output_info);
-			if (ret)
-				return ret;
-		}
 		if (asd->run_mode->val != ATOMISP_RUN_MODE_STILL_CAPTURE) {
 			dev_err(isp->dev,
 				"Need to set the running mode first\n");
@@ -4430,16 +4417,6 @@ static int atomisp_set_fmt_to_isp(struct video_device *vdev,
 	}
 
 	atomisp_update_grid_info(asd, pipe_id, source_pad);
-
-	/* Free the raw_dump buffer first */
-	ia_css_frame_free(asd->raw_output_frame);
-	asd->raw_output_frame = NULL;
-
-	if (!asd->params.online_process &&
-	    ia_css_frame_allocate_from_info(&asd->raw_output_frame,
-		    raw_output_info))
-		return -ENOMEM;
-
 	return 0;
 }
 
@@ -4595,7 +4572,7 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
 	struct atomisp_sub_device *asd = pipe->asd;
 	const struct atomisp_format_bridge *format_bridge;
 	const struct atomisp_format_bridge *snr_format_bridge;
-	struct ia_css_frame_info output_info, raw_output_info;
+	struct ia_css_frame_info output_info;
 	struct v4l2_pix_format snr_fmt;
 	struct v4l2_pix_format backup_fmt, s_fmt;
 	unsigned int dvs_env_w = 0, dvs_env_h = 0;
@@ -4912,8 +4889,7 @@ int atomisp_set_fmt(struct video_device *vdev, struct v4l2_format *f)
 	}
 
 set_fmt_to_isp:
-	ret = atomisp_set_fmt_to_isp(vdev, &output_info, &raw_output_info,
-				     &f->fmt.pix, source_pad);
+	ret = atomisp_set_fmt_to_isp(vdev, &output_info, &f->fmt.pix, source_pad);
 	if (ret) {
 		dev_warn(isp->dev, "Can't set format on ISP. Error %d\n", ret);
 		return -EINVAL;
drivers/staging/media/atomisp/pci/atomisp_compat.h +0 -4
index 06d54c9bcb49..707509922784 100644
@@ -303,10 +303,6 @@ int atomisp_css_copy_get_output_frame_info(
     unsigned int stream_index,
     struct ia_css_frame_info *info);
 
-int atomisp_css_capture_get_output_raw_frame_info(
-    struct atomisp_sub_device *asd,
-    struct ia_css_frame_info *info);
-
 int atomisp_css_preview_get_output_frame_info(
     struct atomisp_sub_device *asd,
     struct ia_css_frame_info *info);
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c +0 -8
index 10be77c478b8..a1c1c9b1e806 100644
@@ -2630,14 +2630,6 @@ int atomisp_css_capture_get_viewfinder_frame_info(
 				ATOMISP_CSS_VF_FRAME, IA_CSS_PIPE_ID_CAPTURE);
 }
 
-int atomisp_css_capture_get_output_raw_frame_info(
-    struct atomisp_sub_device *asd,
-    struct ia_css_frame_info *info)
-{
-	return __get_frame_info(asd, ATOMISP_INPUT_STREAM_GENERAL, info,
-				ATOMISP_CSS_RAW_FRAME, IA_CSS_PIPE_ID_CAPTURE);
-}
-
 int atomisp_css_copy_get_output_frame_info(
     struct atomisp_sub_device *asd,
     unsigned int stream_index,
drivers/staging/media/atomisp/pci/atomisp_fops.c +0 -1
index d8d4c412f66a..7f757f510190 100644
@@ -564,7 +564,6 @@ static void atomisp_subdev_init_struct(struct atomisp_sub_device *asd)
 	asd->params.fpn_en = false;
 	asd->params.xnr_en = false;
 	asd->params.false_color = 0;
-	asd->params.online_process = 1;
 	asd->params.yuv_ds_en = 0;
 	/* s3a grid not enabled for any pipe */
 	asd->params.s3a_enabled_pipe = IA_CSS_PIPE_ID_NUM;
drivers/staging/media/atomisp/pci/atomisp_subdev.h +0 -4
index df6e2a8c5f84..bcb0fe8d0538 100644
@@ -183,9 +183,6 @@ struct atomisp_css_params {
 };
 
 struct atomisp_subdev_params {
-	/* FIXME: Determines whether raw capture buffer are being passed to
-	 * user space. Unimplemented for now. */
-	int online_process;
 	int yuv_ds_en;
 	unsigned int color_effect;
 	bool gdc_cac_en;
@@ -303,7 +300,6 @@ struct atomisp_sub_device {
 	spinlock_t dis_stats_lock;
 
 	struct ia_css_frame *vf_frame; /* TODO: needed? */
-	struct ia_css_frame *raw_output_frame;
 	enum atomisp_frame_status frame_status[VIDEO_MAX_FRAME];
 
 	/* This field specifies which camera (v4l2 input) is selected. */
Signature · 1 line
2.39.1
maintainer Reviewed-by on the v1 series
#19 lore raw
In reply to Hans de Goede
Quoted 9 lines · Hans de Goede

Hi All,

This is the first step of the removal of special/obscure features discussed here:

https://lore.kernel.org/linux-media/[email protected]/

Plus some follow-up patches removing some dead code (some new dead code as well as some pre-existing dead code).

As usual for non-commented

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#20 lore raw

Hi,

Quoted 6 lines · Andy Shevchenko
Quoted 5 lines · Hans de Goede

Hi All,

This is the first step of the removal of special/obscure features discussed here:

Quoted 7 lines
Quoted 4 lines

https://lore.kernel.org/linux-media/[email protected]/

Plus some follow-up patches removing some dead code (some new dead code as well as some pre-existing dead code).

As usual for non-commented

Thanks!

I have just pushed this series to:

https://git.kernel.org/pub/scm/linux/kernel/git/hansg/linux.git/log/?h=media-atomisp

Adding your Reviewed-by to 8/10 patches and addressing your remarks (except for the switch-case thing) in the other 2 patches.

Let me know if you are ok with / want me to add your Reviewed-by to the other 2 patches.

Regards,

Hans

#21 lore raw
In reply to Hans de Goede

Em Tue, 21 Feb 2023 15:58:56 +0100
Hans de Goede <[email protected]> escreveu:

Quoted 9 lines

Hi All,

This is the first step of the removal of special/obscure features discussed here:

https://lore.kernel.org/linux-media/[email protected]/

Plus some follow-up patches removing some dead code (some new dead code as well as some pre-existing dead code).

Nice cleanup. Yeah, I was considering doing this for some time, as those "extra" modes are meant to be used only on Android.

Regards,
Mauro

Quoted 19 lines

Regards,

Hans

Hans de Goede (10):
media: atomisp: Remove depth-mode support
media: atomisp: Remove continuous mode support
media: atomisp: Remove delayed_init related code
media: atomisp: Remove crop_needs_override from atomisp_set_fmt()
media: atomisp: Remove atomisp_css_enable_raw_binning()
media: atomisp: Remove atomisp_get_metadata_type()
media: atomisp: Remove unused SOC_CAMERA, XENON_FLASH and FILE_INPUT
subdev types
media: atomisp: Remove ATOMISP_USE_YUVPP()
media: atomisp: Remove yuvpp_mode
media: atomisp: Remove online_process setting

Quoted 15 lines
 .../media/atomisp/include/linux/atomisp.h     |  26 -
 .../atomisp/include/linux/atomisp_platform.h  |   9 +-
 .../staging/media/atomisp/pci/atomisp_cmd.c   | 744 ++----------------
 .../staging/media/atomisp/pci/atomisp_cmd.h   |   9 -
 .../media/atomisp/pci/atomisp_compat.h        |   7 -
 .../media/atomisp/pci/atomisp_compat_css20.c  | 321 +-------
 .../staging/media/atomisp/pci/atomisp_fops.c  | 110 +--
 .../media/atomisp/pci/atomisp_internal.h      |  21 -
 .../staging/media/atomisp/pci/atomisp_ioctl.c | 162 +---
 .../staging/media/atomisp/pci/atomisp_ioctl.h |   3 -
 .../media/atomisp/pci/atomisp_subdev.c        |  78 +-
 .../media/atomisp/pci/atomisp_subdev.h        |  16 -
 .../staging/media/atomisp/pci/atomisp_v4l2.c  |  35 +-
 13 files changed, 129 insertions(+), 1412 deletions(-)

Thanks,
Mauro