media: atomisp: Drop unused frame_status tracking
authorHans de Goede <hdegoede@redhat.com>
Sat, 13 Apr 2024 15:14:52 +0000 (16:14 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 26 Apr 2024 10:00:44 +0000 (11:00 +0100)
After removing the flash support frame_status now always is
ATOMISP_FRAME_STATUS_OK aka 0. Drop frame_status tracking.

This also means one less atomisp custom use for the vb2_buffer->reserved*
fields (all custom use of these fields should be removed).

While at it also remove the no longer used vf_frame pointer from
struct atomisp_sub_device.

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.h
drivers/staging/media/atomisp/pci/atomisp_cmd.c
drivers/staging/media/atomisp/pci/atomisp_ioctl.c
drivers/staging/media/atomisp/pci/atomisp_subdev.h

index db0c1b87c9ef638b4c196adb34eb8c4d14d30d5e..16c9da172c0317c1f3f958851a544992c4a977ee 100644 (file)
@@ -614,21 +614,6 @@ enum atomisp_camera_port {
        ATOMISP_CAMERA_NR_PORTS
 };
 
-/* Frame status. This is used to detect corrupted frames and flash
- * exposed frames. Usually, the first 2 frames coming out of the sensor
- * are corrupted. When using flash, the frame before and the frame after
- * the flash exposed frame may be partially exposed by flash. The ISP
- * statistics for these frames should not be used by the 3A library.
- * The frame status value can be found in the "reserved" field in the
- * v4l2_buffer struct. */
-enum atomisp_frame_status {
-       ATOMISP_FRAME_STATUS_OK,
-       ATOMISP_FRAME_STATUS_CORRUPTED,
-       ATOMISP_FRAME_STATUS_FLASH_EXPOSED,
-       ATOMISP_FRAME_STATUS_FLASH_PARTIAL,
-       ATOMISP_FRAME_STATUS_FLASH_FAILED,
-};
-
 enum atomisp_ext_isp_id {
        EXT_ISP_CID_ISO = 0,
        EXT_ISP_CID_CAPTURE_HDR,
index 472ce9e7ea71682bf7aa6b4925096b056620c859..9fc2f0af6f3d9f6904f81faa9817ebdc5b7126d5 100644 (file)
@@ -813,7 +813,6 @@ void atomisp_buf_done(struct atomisp_sub_device *asd, int error,
                }
 
                pipe->frame_config_id[i] = frame->isp_config_id;
-               asd->frame_status[i] = ATOMISP_FRAME_STATUS_OK;
 
                if (asd->params.css_update_params_needed) {
                        atomisp_apply_css_parameters(asd,
index e243faec143ecc35fb7c22d1d9697671832d4200..d7c842997139ddd3fd31ec9dc994750e402c3936 100644 (file)
@@ -826,7 +826,6 @@ static int atomisp_dqbuf_wrapper(struct file *file, void *fh, struct v4l2_buffer
 {
        struct video_device *vdev = video_devdata(file);
        struct atomisp_video_pipe *pipe = atomisp_to_video_pipe(vdev);
-       struct atomisp_sub_device *asd = pipe->asd;
        struct atomisp_device *isp = video_get_drvdata(vdev);
        struct ia_css_frame *frame;
        struct vb2_buffer *vb;
@@ -839,15 +838,8 @@ static int atomisp_dqbuf_wrapper(struct file *file, void *fh, struct v4l2_buffer
        vb = vb2_get_buffer(&pipe->vb_queue, buf->index);
        frame = vb_to_frame(vb);
 
-       buf->reserved = asd->frame_status[buf->index];
-
-       /*
-        * Hack:
-        * Currently frame_status in the enum type which takes no more lower
-        * 8 bit.
-        * use bit[31:16] for exp_id as it is only in the range of 1~255
-        */
-       buf->reserved &= 0x0000ffff;
+       /* reserved bit[31:16] is used for exp_id */
+       buf->reserved = 0;
        if (!(buf->flags & V4L2_BUF_FLAG_ERROR))
                buf->reserved |= frame->exp_id;
        buf->reserved2 = pipe->frame_config_id[buf->index];
index 4ab123a1c165d59a6bb0f68856caca81b35bac13..b6c66a5d523c37412b22a73de6a87dacda1914c9 100644 (file)
@@ -274,9 +274,6 @@ struct atomisp_sub_device {
        struct list_head dis_stats_in_css;
        spinlock_t dis_stats_lock;
 
-       struct ia_css_frame *vf_frame; /* TODO: needed? */
-       enum atomisp_frame_status frame_status[VIDEO_MAX_FRAME];
-
        /* This field specifies which camera (v4l2 input) is selected. */
        int input_curr;