Commit 659a6699 authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab

media: atomisp: Drop unused frame_status tracking

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: default avatarAndy Shevchenko <andy@kernel.org>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent f468ff16
......@@ -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,
......
......@@ -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,
......
......@@ -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];
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment