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

media: atomisp: Remove isp_subdev_propagate()

isp_subdev_propagate() is a wrapper around atomisp_subdev_set_selection()
which gets only used in a single place.

Call atomisp_subdev_set_selection() directly in that single place instead.
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 3b621e9e
...@@ -287,35 +287,6 @@ static void isp_get_fmt_rect(struct v4l2_subdev *sd, ...@@ -287,35 +287,6 @@ static void isp_get_fmt_rect(struct v4l2_subdev *sd,
} }
} }
static void isp_subdev_propagate(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
u32 which, uint32_t pad, uint32_t target,
uint32_t flags)
{
struct v4l2_mbus_framefmt *ffmt[ATOMISP_SUBDEV_PADS_NUM];
struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM],
*comp[ATOMISP_SUBDEV_PADS_NUM];
if (flags & V4L2_SEL_FLAG_KEEP_CONFIG)
return;
isp_get_fmt_rect(sd, sd_state, which, ffmt, crop, comp);
switch (pad) {
case ATOMISP_SUBDEV_PAD_SINK: {
struct v4l2_rect r = {0};
/* Only crop target supported on sink pad. */
r.width = ffmt[pad]->width;
r.height = ffmt[pad]->height;
atomisp_subdev_set_selection(sd, sd_state, which, pad,
target, flags, &r);
break;
}
}
}
static int isp_subdev_get_selection(struct v4l2_subdev *sd, static int isp_subdev_get_selection(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state, struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_selection *sel) struct v4l2_subdev_selection *sel)
...@@ -541,6 +512,7 @@ void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd, ...@@ -541,6 +512,7 @@ void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
case ATOMISP_SUBDEV_PAD_SINK: { case ATOMISP_SUBDEV_PAD_SINK: {
const struct atomisp_in_fmt_conv *fc = const struct atomisp_in_fmt_conv *fc =
atomisp_find_in_fmt_conv(ffmt->code); atomisp_find_in_fmt_conv(ffmt->code);
struct v4l2_rect r = {};
if (!fc) { if (!fc) {
fc = atomisp_in_fmt_conv; fc = atomisp_in_fmt_conv;
...@@ -551,8 +523,12 @@ void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd, ...@@ -551,8 +523,12 @@ void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
*__ffmt = *ffmt; *__ffmt = *ffmt;
isp_subdev_propagate(sd, sd_state, which, pad, /* Propagate new ffmt to selection */
V4L2_SEL_TGT_CROP, 0); r.width = ffmt->width;
r.height = ffmt->height;
/* Only crop target supported on sink pad. */
atomisp_subdev_set_selection(sd, sd_state, which, pad,
V4L2_SEL_TGT_CROP, 0, &r);
if (which == V4L2_SUBDEV_FORMAT_ACTIVE) { if (which == V4L2_SUBDEV_FORMAT_ACTIVE) {
atomisp_css_input_set_resolution(isp_sd, atomisp_css_input_set_resolution(isp_sd,
......
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