Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
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>

authored by

Hans de Goede and committed by
Mauro Carvalho Chehab
c1dc6f5a 3b621e9e

+7 -31
+7 -31
drivers/staging/media/atomisp/pci/atomisp_subdev.c
··· 287 287 } 288 288 } 289 289 290 - static void isp_subdev_propagate(struct v4l2_subdev *sd, 291 - struct v4l2_subdev_state *sd_state, 292 - u32 which, uint32_t pad, uint32_t target, 293 - uint32_t flags) 294 - { 295 - struct v4l2_mbus_framefmt *ffmt[ATOMISP_SUBDEV_PADS_NUM]; 296 - struct v4l2_rect *crop[ATOMISP_SUBDEV_PADS_NUM], 297 - *comp[ATOMISP_SUBDEV_PADS_NUM]; 298 - 299 - if (flags & V4L2_SEL_FLAG_KEEP_CONFIG) 300 - return; 301 - 302 - isp_get_fmt_rect(sd, sd_state, which, ffmt, crop, comp); 303 - 304 - switch (pad) { 305 - case ATOMISP_SUBDEV_PAD_SINK: { 306 - struct v4l2_rect r = {0}; 307 - 308 - /* Only crop target supported on sink pad. */ 309 - r.width = ffmt[pad]->width; 310 - r.height = ffmt[pad]->height; 311 - 312 - atomisp_subdev_set_selection(sd, sd_state, which, pad, 313 - target, flags, &r); 314 - break; 315 - } 316 - } 317 - } 318 - 319 290 static int isp_subdev_get_selection(struct v4l2_subdev *sd, 320 291 struct v4l2_subdev_state *sd_state, 321 292 struct v4l2_subdev_selection *sel) ··· 512 541 case ATOMISP_SUBDEV_PAD_SINK: { 513 542 const struct atomisp_in_fmt_conv *fc = 514 543 atomisp_find_in_fmt_conv(ffmt->code); 544 + struct v4l2_rect r = {}; 515 545 516 546 if (!fc) { 517 547 fc = atomisp_in_fmt_conv; ··· 523 551 524 552 *__ffmt = *ffmt; 525 553 526 - isp_subdev_propagate(sd, sd_state, which, pad, 527 - V4L2_SEL_TGT_CROP, 0); 554 + /* Propagate new ffmt to selection */ 555 + r.width = ffmt->width; 556 + r.height = ffmt->height; 557 + /* Only crop target supported on sink pad. */ 558 + atomisp_subdev_set_selection(sd, sd_state, which, pad, 559 + V4L2_SEL_TGT_CROP, 0, &r); 528 560 529 561 if (which == V4L2_SUBDEV_FORMAT_ACTIVE) { 530 562 atomisp_css_input_set_resolution(isp_sd,