mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 18:04:38 -04:00
media: atomisp: Rename video_out_preview to video_out
Now that we have only 1 /dev/video# node for output for all different run-modes (with only 1 run-mode at a time) using video_out_preview for the remaining atomisp_pipe does not properly reflect that this is *the* output pipe. Fo the following renames to fix the naming: s/video_out_preview/video_out/ s/ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW/ATOMISP_SUBDEV_PAD_SOURCE/ Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
26dcabc0dd
commit
aca8a1dfb9
@@ -643,7 +643,7 @@ void atomisp_flush_video_pipe(struct atomisp_video_pipe *pipe, enum vb2_buffer_s
|
||||
/* Returns queued buffers back to video-core */
|
||||
void atomisp_flush_bufs_and_wakeup(struct atomisp_sub_device *asd)
|
||||
{
|
||||
atomisp_flush_video_pipe(&asd->video_out_preview, VB2_BUF_STATE_ERROR, false);
|
||||
atomisp_flush_video_pipe(&asd->video_out, VB2_BUF_STATE_ERROR, false);
|
||||
}
|
||||
|
||||
/* clean out the parameters that did not apply */
|
||||
@@ -1032,7 +1032,7 @@ static void __atomisp_css_recover(struct atomisp_device *isp, bool isp_timeout)
|
||||
atomisp_flush_bufs_and_wakeup(&isp->asd);
|
||||
|
||||
/* Requeue unprocessed per-frame parameters. */
|
||||
atomisp_recover_params_queue(&isp->asd.video_out_preview);
|
||||
atomisp_recover_params_queue(&isp->asd.video_out);
|
||||
|
||||
ret = v4l2_subdev_call(
|
||||
isp->inputs[isp->asd.input_curr].camera, video,
|
||||
@@ -1293,7 +1293,7 @@ static void atomisp_update_capture_mode(struct atomisp_sub_device *asd)
|
||||
atomisp_css_capture_set_mode(asd, IA_CSS_CAPTURE_MODE_ADVANCED);
|
||||
else if (asd->params.low_light)
|
||||
atomisp_css_capture_set_mode(asd, IA_CSS_CAPTURE_MODE_LOW_LIGHT);
|
||||
else if (asd->video_out_preview.sh_fmt == IA_CSS_FRAME_FORMAT_RAW)
|
||||
else if (asd->video_out.sh_fmt == IA_CSS_FRAME_FORMAT_RAW)
|
||||
atomisp_css_capture_set_mode(asd, IA_CSS_CAPTURE_MODE_RAW);
|
||||
else
|
||||
atomisp_css_capture_set_mode(asd, IA_CSS_CAPTURE_MODE_PRIMARY);
|
||||
|
||||
@@ -1958,7 +1958,7 @@ void atomisp_css_stop(struct atomisp_sub_device *asd,
|
||||
list_splice_init(&asd->metadata_ready[i], &asd->metadata[i]);
|
||||
}
|
||||
|
||||
atomisp_flush_params_queue(&asd->video_out_preview);
|
||||
atomisp_flush_params_queue(&asd->video_out);
|
||||
atomisp_free_css_parameters(&asd->params.css_param);
|
||||
memset(&asd->params.css_param, 0, sizeof(asd->params.css_param));
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ int atomisp_qbuffers_to_css(struct atomisp_sub_device *asd)
|
||||
pipe_id = IA_CSS_PIPE_ID_CAPTURE;
|
||||
}
|
||||
|
||||
atomisp_q_video_buffers_to_css(asd, &asd->video_out_preview,
|
||||
atomisp_q_video_buffers_to_css(asd, &asd->video_out,
|
||||
ATOMISP_INPUT_STREAM_GENERAL,
|
||||
IA_CSS_BUFFER_TYPE_OUTPUT_FRAME, pipe_id);
|
||||
return 0;
|
||||
@@ -494,7 +494,7 @@ static void atomisp_subdev_init_struct(struct atomisp_sub_device *asd)
|
||||
*/
|
||||
static unsigned int atomisp_subdev_users(struct atomisp_sub_device *asd)
|
||||
{
|
||||
return asd->video_out_preview.users;
|
||||
return asd->video_out.users;
|
||||
}
|
||||
|
||||
unsigned int atomisp_dev_users(struct atomisp_device *isp)
|
||||
|
||||
@@ -618,7 +618,7 @@ static int atomisp_enum_input(struct file *file, void *fh,
|
||||
static unsigned int
|
||||
atomisp_subdev_streaming_count(struct atomisp_sub_device *asd)
|
||||
{
|
||||
return vb2_start_streaming_called(&asd->video_out_preview.vb_queue);
|
||||
return vb2_start_streaming_called(&asd->video_out.vb_queue);
|
||||
}
|
||||
|
||||
unsigned int atomisp_streaming_count(struct atomisp_device *isp)
|
||||
|
||||
@@ -355,7 +355,7 @@ static const char *atomisp_pad_str(unsigned int pad)
|
||||
{
|
||||
static const char *const pad_str[] = {
|
||||
"ATOMISP_SUBDEV_PAD_SINK",
|
||||
"ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW",
|
||||
"ATOMISP_SUBDEV_PAD_SOURCE",
|
||||
};
|
||||
|
||||
if (pad >= ARRAY_SIZE(pad_str))
|
||||
@@ -431,7 +431,7 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
|
||||
struct v4l2_rect tmp = *crop[pad];
|
||||
|
||||
atomisp_subdev_set_selection(sd, sd_state, which,
|
||||
ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW,
|
||||
ATOMISP_SUBDEV_PAD_SOURCE,
|
||||
V4L2_SEL_TGT_COMPOSE, flags, &tmp);
|
||||
}
|
||||
|
||||
@@ -593,7 +593,7 @@ void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
|
||||
|
||||
break;
|
||||
}
|
||||
case ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW:
|
||||
case ATOMISP_SUBDEV_PAD_SOURCE:
|
||||
__ffmt->code = ffmt->code;
|
||||
break;
|
||||
}
|
||||
@@ -899,12 +899,10 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
|
||||
sd->flags |= V4L2_SUBDEV_FL_HAS_EVENTS | V4L2_SUBDEV_FL_HAS_DEVNODE;
|
||||
|
||||
pads[ATOMISP_SUBDEV_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
|
||||
pads[ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW].flags = MEDIA_PAD_FL_SOURCE;
|
||||
pads[ATOMISP_SUBDEV_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
|
||||
|
||||
asd->fmt[ATOMISP_SUBDEV_PAD_SINK].fmt.code =
|
||||
MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
asd->fmt[ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW].fmt.code =
|
||||
MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
asd->fmt[ATOMISP_SUBDEV_PAD_SINK].fmt.code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
asd->fmt[ATOMISP_SUBDEV_PAD_SOURCE].fmt.code = MEDIA_BUS_FMT_SBGGR10_1X10;
|
||||
|
||||
me->ops = &isp_subdev_media_ops;
|
||||
me->function = MEDIA_ENT_F_PROC_VIDEO_ISP;
|
||||
@@ -912,13 +910,11 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = atomisp_init_subdev_pipe(asd, &asd->video_out_preview,
|
||||
V4L2_BUF_TYPE_VIDEO_CAPTURE);
|
||||
ret = atomisp_init_subdev_pipe(asd, &asd->video_out, V4L2_BUF_TYPE_VIDEO_CAPTURE);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = atomisp_video_init(&asd->video_out_preview, "PREVIEW",
|
||||
ATOMISP_RUN_MODE_PREVIEW);
|
||||
ret = atomisp_video_init(&asd->video_out, "PREVIEW", ATOMISP_RUN_MODE_PREVIEW);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -980,9 +976,8 @@ int atomisp_create_pads_links(struct atomisp_device *isp)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = media_create_pad_link(&isp->asd.subdev.entity,
|
||||
ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW,
|
||||
&isp->asd.video_out_preview.vdev.entity, 0, 0);
|
||||
ret = media_create_pad_link(&isp->asd.subdev.entity, ATOMISP_SUBDEV_PAD_SOURCE,
|
||||
&isp->asd.video_out.vdev.entity, 0, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -1014,7 +1009,7 @@ void atomisp_subdev_unregister_entities(struct atomisp_sub_device *asd)
|
||||
{
|
||||
atomisp_subdev_cleanup_entities(asd);
|
||||
v4l2_device_unregister_subdev(&asd->subdev);
|
||||
atomisp_video_unregister(&asd->video_out_preview);
|
||||
atomisp_video_unregister(&asd->video_out);
|
||||
}
|
||||
|
||||
int atomisp_subdev_register_subdev(struct atomisp_sub_device *asd,
|
||||
@@ -1028,10 +1023,9 @@ int atomisp_subdev_register_video_nodes(struct atomisp_sub_device *asd,
|
||||
{
|
||||
int ret;
|
||||
|
||||
asd->video_out_preview.vdev.v4l2_dev = vdev;
|
||||
asd->video_out_preview.vdev.device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
|
||||
ret = video_register_device(&asd->video_out_preview.vdev,
|
||||
VFL_TYPE_VIDEO, -1);
|
||||
asd->video_out.vdev.v4l2_dev = vdev;
|
||||
asd->video_out.vdev.device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
|
||||
ret = video_register_device(&asd->video_out.vdev, VFL_TYPE_VIDEO, -1);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#define ATOMISP_MAX_EXP_ID (250)
|
||||
|
||||
#define ATOMISP_SUBDEV_PAD_SINK 0
|
||||
#define ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW 1
|
||||
#define ATOMISP_SUBDEV_PAD_SOURCE 1
|
||||
#define ATOMISP_SUBDEV_PADS_NUM 2
|
||||
|
||||
struct atomisp_in_fmt_conv {
|
||||
@@ -244,8 +244,7 @@ struct atomisp_sub_device {
|
||||
u16 capture_pad; /* main capture pad; defines much of isp config */
|
||||
|
||||
unsigned int output;
|
||||
struct atomisp_video_pipe video_out_preview; /* preview output */
|
||||
/* struct isp_subdev_params params; */
|
||||
struct atomisp_video_pipe video_out;
|
||||
struct atomisp_device *isp;
|
||||
struct v4l2_ctrl_handler ctrl_handler;
|
||||
struct v4l2_ctrl *run_mode;
|
||||
|
||||
Reference in New Issue
Block a user