media: atomisp: Remove unused SOC_CAMERA, XENON_FLASH and FILE_INPUT subdev types
authorHans de Goede <hdegoede@redhat.com>
Tue, 21 Feb 2023 14:59:03 +0000 (14:59 +0000)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sat, 15 Apr 2023 09:23:36 +0000 (10:23 +0100)
Nothing registers subdevs with the SOC_CAMERA, XENON_FLASH and FILE_INPUT
types, remove the code for these.

Link: https://lore.kernel.org/r/20230221145906.8113-8-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>
drivers/staging/media/atomisp/include/linux/atomisp_platform.h
drivers/staging/media/atomisp/pci/atomisp_cmd.c
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c
drivers/staging/media/atomisp/pci/atomisp_fops.c
drivers/staging/media/atomisp/pci/atomisp_internal.h
drivers/staging/media/atomisp/pci/atomisp_subdev.c
drivers/staging/media/atomisp/pci/atomisp_v4l2.c

index 539b21d39d3be6d99cd127c9ede87fdeb19639b6..b77bf814a5a6a5a4d7516507645fbf75955f243c 100644 (file)
@@ -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 {
index 32b0747cf07b82534627ddd0914829030f6baf94..99e5a5c99ad97de4a3653af9a58d44b91ca2386d 100644 (file)
@@ -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)) {
@@ -4264,8 +4262,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) {
@@ -4366,13 +4363,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);
@@ -4463,12 +4453,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 */
index ff67db6d691de55aa8974a6253c61c9ba6c08eba..d31beabcff8a7684bd8a04db1992b306f093600e 100644 (file)
@@ -597,8 +597,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]
@@ -612,10 +610,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;
@@ -2573,13 +2568,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)) {
index 55c9ff87c112e15a3fa7a822cc56bfc33ef39717..e5203f68f0f99272ed2653a8ef3c0b773bf7e8f4 100644 (file)
@@ -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;
index 7f346161c4b55596588409ed9e3402fb0f364d36..1c1c4cf41e320c0f852e9fb4b476149f2f18249d 100644 (file)
 #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
index 9f07ed9f5306d1ca17d858fa2a127864c82e4bba..37199188307672bb540d9a64d516087ccd9ca700 100644 (file)
@@ -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
index c236cf081a47d462d5a7584b718afc5e3676b052..61b9d65bf32b6770230105e4e2c5ae442043a66c 100644 (file)
@@ -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;