This is an automatic generated email to let you know that the following patch 
were queued:

Subject: media: atomisp: Drop unused frame_status tracking
Author:  Hans de Goede <hdego...@redhat.com>
Date:    Sat Apr 13 16:14:52 2024 +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 <a...@kernel.org>
Signed-off-by: Hans de Goede <hdego...@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mche...@kernel.org>

 drivers/staging/media/atomisp/include/linux/atomisp.h | 15 ---------------
 drivers/staging/media/atomisp/pci/atomisp_cmd.c       |  1 -
 drivers/staging/media/atomisp/pci/atomisp_ioctl.c     | 12 ++----------
 drivers/staging/media/atomisp/pci/atomisp_subdev.h    |  3 ---
 4 files changed, 2 insertions(+), 29 deletions(-)

---

diff --git a/drivers/staging/media/atomisp/include/linux/atomisp.h 
b/drivers/staging/media/atomisp/include/linux/atomisp.h
index db0c1b87c9ef..16c9da172c03 100644
--- a/drivers/staging/media/atomisp/include/linux/atomisp.h
+++ b/drivers/staging/media/atomisp/include/linux/atomisp.h
@@ -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,
diff --git a/drivers/staging/media/atomisp/pci/atomisp_cmd.c 
b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
index 472ce9e7ea71..9fc2f0af6f3d 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_cmd.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_cmd.c
@@ -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,
diff --git a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c 
b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
index e243faec143e..d7c842997139 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_ioctl.c
@@ -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];
diff --git a/drivers/staging/media/atomisp/pci/atomisp_subdev.h 
b/drivers/staging/media/atomisp/pci/atomisp_subdev.h
index 4ab123a1c165..b6c66a5d523c 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_subdev.h
+++ b/drivers/staging/media/atomisp/pci/atomisp_subdev.h
@@ -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;
 

Reply via email to