aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2023-02-21 14:58:57 +0000
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-04-15 10:21:02 +0100
commitd33b94c0938984db5a6ed78b87225f4858b73b10 (patch)
tree4aa9f353f9edd36cd7a4005284ce2c344c999139 /drivers/staging/media/atomisp/pci/atomisp_ioctl.c
parentmedia: i2c: Drop unused vs6624 camera sensor driver (diff)
downloadwireguard-linux-d33b94c0938984db5a6ed78b87225f4858b73b10.tar.xz
wireguard-linux-d33b94c0938984db5a6ed78b87225f4858b73b10.zip
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. Link: https://lore.kernel.org/linux-media/ea81b17b-7d1f-a5e1-11dd-04db310e1e50@redhat.com/ Link: https://lore.kernel.org/r/20230221145906.8113-2-hdegoede@redhat.com Reviewed-by: Andy Shevchenko <andy@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp_ioctl.c')
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp_ioctl.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
index d1314bdbf7d5..d3b773bac5aa 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
@@ -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 @@ start_sensor:
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 @@ start_sensor:
goto out_unlock;
}
-start_delay_wq:
if (asd->continuous_mode->val) {
atomisp_subdev_get_ffmt(&asd->subdev, NULL,
V4L2_SUBDEV_FORMAT_ACTIVE,