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

[media] v4l2: replace try_mbus_fmt by set_fmt in bridge drivers

Replace all calls to try_mbus_fmt in bridge drivers by calls to the
set_fmt pad op.

[mchehab@osg.samsung.com: fix a merge conflict at mcam-core.c]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Scott Jiang <scott.jiang.linux@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
5eab4983 6e80c473

+158 -118
+7 -4
drivers/media/pci/saa7134/saa7134-empress.c
··· 157 157 struct v4l2_format *f) 158 158 { 159 159 struct saa7134_dev *dev = video_drvdata(file); 160 - struct v4l2_mbus_framefmt mbus_fmt; 160 + struct v4l2_subdev_pad_config pad_cfg; 161 + struct v4l2_subdev_format format = { 162 + .which = V4L2_SUBDEV_FORMAT_TRY, 163 + }; 161 164 162 - v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, MEDIA_BUS_FMT_FIXED); 163 - saa_call_all(dev, video, try_mbus_fmt, &mbus_fmt); 164 - v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt); 165 + v4l2_fill_mbus_format(&format.format, &f->fmt.pix, MEDIA_BUS_FMT_FIXED); 166 + saa_call_all(dev, pad, set_fmt, &pad_cfg, &format); 167 + v4l2_fill_pix_format(&f->fmt.pix, &format.format); 165 168 166 169 f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; 167 170 f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
+9 -6
drivers/media/platform/blackfin/bfin_capture.c
··· 602 602 { 603 603 struct bcap_format *sf = bcap->sensor_formats; 604 604 struct bcap_format *fmt = NULL; 605 - struct v4l2_mbus_framefmt mbus_fmt; 605 + struct v4l2_subdev_pad_config pad_cfg; 606 + struct v4l2_subdev_format format = { 607 + .which = V4L2_SUBDEV_FORMAT_TRY, 608 + }; 606 609 int ret, i; 607 610 608 611 for (i = 0; i < bcap->num_sensor_formats; i++) { ··· 616 613 if (i == bcap->num_sensor_formats) 617 614 fmt = &sf[0]; 618 615 619 - v4l2_fill_mbus_format(&mbus_fmt, pixfmt, fmt->mbus_code); 620 - ret = v4l2_subdev_call(bcap->sd, video, 621 - try_mbus_fmt, &mbus_fmt); 616 + v4l2_fill_mbus_format(&format.format, pixfmt, fmt->mbus_code); 617 + ret = v4l2_subdev_call(bcap->sd, pad, set_fmt, &pad_cfg, 618 + &format); 622 619 if (ret < 0) 623 620 return ret; 624 - v4l2_fill_pix_format(pixfmt, &mbus_fmt); 621 + v4l2_fill_pix_format(pixfmt, &format.format); 625 622 if (bcap_fmt) { 626 623 for (i = 0; i < bcap->num_sensor_formats; i++) { 627 624 fmt = &sf[i]; 628 - if (mbus_fmt.code == fmt->mbus_code) 625 + if (format.format.code == fmt->mbus_code) 629 626 break; 630 627 } 631 628 *bcap_fmt = *fmt;
+7 -4
drivers/media/platform/marvell-ccic/mcam-core.c
··· 1351 1351 struct mcam_camera *cam = video_drvdata(filp); 1352 1352 struct mcam_format_struct *f; 1353 1353 struct v4l2_pix_format *pix = &fmt->fmt.pix; 1354 - struct v4l2_mbus_framefmt mbus_fmt; 1354 + struct v4l2_subdev_pad_config pad_cfg; 1355 + struct v4l2_subdev_format format = { 1356 + .which = V4L2_SUBDEV_FORMAT_TRY, 1357 + }; 1355 1358 int ret; 1356 1359 1357 1360 f = mcam_find_format(pix->pixelformat); 1358 1361 pix->pixelformat = f->pixelformat; 1359 - v4l2_fill_mbus_format(&mbus_fmt, pix, f->mbus_code); 1360 - ret = sensor_call(cam, video, try_mbus_fmt, &mbus_fmt); 1361 - v4l2_fill_pix_format(pix, &mbus_fmt); 1362 + v4l2_fill_mbus_format(&format.format, pix, f->mbus_code); 1363 + ret = sensor_call(cam, pad, set_fmt, &pad_cfg, &format); 1364 + v4l2_fill_pix_format(pix, &format.format); 1362 1365 pix->bytesperline = pix->width * f->bpp; 1363 1366 switch (f->pixelformat) { 1364 1367 case V4L2_PIX_FMT_YUV420:
+16 -12
drivers/media/platform/soc_camera/atmel-isi.c
··· 535 535 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 536 536 const struct soc_camera_format_xlate *xlate; 537 537 struct v4l2_pix_format *pix = &f->fmt.pix; 538 - struct v4l2_mbus_framefmt mf; 538 + struct v4l2_subdev_pad_config pad_cfg; 539 + struct v4l2_subdev_format format = { 540 + .which = V4L2_SUBDEV_FORMAT_TRY, 541 + }; 542 + struct v4l2_mbus_framefmt *mf = &format.format; 539 543 u32 pixfmt = pix->pixelformat; 540 544 int ret; 541 545 ··· 556 552 pix->width = MAX_SUPPORT_WIDTH; 557 553 558 554 /* limit to sensor capabilities */ 559 - mf.width = pix->width; 560 - mf.height = pix->height; 561 - mf.field = pix->field; 562 - mf.colorspace = pix->colorspace; 563 - mf.code = xlate->code; 555 + mf->width = pix->width; 556 + mf->height = pix->height; 557 + mf->field = pix->field; 558 + mf->colorspace = pix->colorspace; 559 + mf->code = xlate->code; 564 560 565 - ret = v4l2_subdev_call(sd, video, try_mbus_fmt, &mf); 561 + ret = v4l2_subdev_call(sd, pad, set_fmt, &pad_cfg, &format); 566 562 if (ret < 0) 567 563 return ret; 568 564 569 - pix->width = mf.width; 570 - pix->height = mf.height; 571 - pix->colorspace = mf.colorspace; 565 + pix->width = mf->width; 566 + pix->height = mf->height; 567 + pix->colorspace = mf->colorspace; 572 568 573 - switch (mf.field) { 569 + switch (mf->field) { 574 570 case V4L2_FIELD_ANY: 575 571 pix->field = V4L2_FIELD_NONE; 576 572 break; ··· 578 574 break; 579 575 default: 580 576 dev_err(icd->parent, "Field type %d unsupported.\n", 581 - mf.field); 577 + mf->field); 582 578 ret = -EINVAL; 583 579 } 584 580
+21 -17
drivers/media/platform/soc_camera/mx2_camera.c
··· 1187 1187 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 1188 1188 const struct soc_camera_format_xlate *xlate; 1189 1189 struct v4l2_pix_format *pix = &f->fmt.pix; 1190 - struct v4l2_mbus_framefmt mf; 1190 + struct v4l2_subdev_pad_config pad_cfg; 1191 + struct v4l2_subdev_format format = { 1192 + .which = V4L2_SUBDEV_FORMAT_TRY, 1193 + }; 1194 + struct v4l2_mbus_framefmt *mf = &format.format; 1191 1195 __u32 pixfmt = pix->pixelformat; 1192 1196 struct soc_camera_host *ici = to_soc_camera_host(icd->parent); 1193 1197 struct mx2_camera_dev *pcdev = ici->priv; ··· 1214 1210 pix->width &= ~0x7; 1215 1211 1216 1212 /* limit to sensor capabilities */ 1217 - mf.width = pix->width; 1218 - mf.height = pix->height; 1219 - mf.field = pix->field; 1220 - mf.colorspace = pix->colorspace; 1221 - mf.code = xlate->code; 1213 + mf->width = pix->width; 1214 + mf->height = pix->height; 1215 + mf->field = pix->field; 1216 + mf->colorspace = pix->colorspace; 1217 + mf->code = xlate->code; 1222 1218 1223 - ret = v4l2_subdev_call(sd, video, try_mbus_fmt, &mf); 1219 + ret = v4l2_subdev_call(sd, pad, set_fmt, &pad_cfg, &format); 1224 1220 if (ret < 0) 1225 1221 return ret; 1226 1222 ··· 1231 1227 emma_prp = mx27_emma_prp_get_format(xlate->code, 1232 1228 xlate->host_fmt->fourcc); 1233 1229 1234 - if ((mf.width != pix->width || mf.height != pix->height) && 1230 + if ((mf->width != pix->width || mf->height != pix->height) && 1235 1231 emma_prp->cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { 1236 - if (mx2_emmaprp_resize(pcdev, &mf, pix, false) < 0) 1232 + if (mx2_emmaprp_resize(pcdev, mf, pix, false) < 0) 1237 1233 dev_dbg(icd->parent, "%s: can't resize\n", __func__); 1238 1234 } 1239 1235 1240 - if (mf.field == V4L2_FIELD_ANY) 1241 - mf.field = V4L2_FIELD_NONE; 1236 + if (mf->field == V4L2_FIELD_ANY) 1237 + mf->field = V4L2_FIELD_NONE; 1242 1238 /* 1243 1239 * Driver supports interlaced images provided they have 1244 1240 * both fields so that they can be processed as if they 1245 1241 * were progressive. 1246 1242 */ 1247 - if (mf.field != V4L2_FIELD_NONE && !V4L2_FIELD_HAS_BOTH(mf.field)) { 1243 + if (mf->field != V4L2_FIELD_NONE && !V4L2_FIELD_HAS_BOTH(mf->field)) { 1248 1244 dev_err(icd->parent, "Field type %d unsupported.\n", 1249 - mf.field); 1245 + mf->field); 1250 1246 return -EINVAL; 1251 1247 } 1252 1248 1253 - pix->width = mf.width; 1254 - pix->height = mf.height; 1255 - pix->field = mf.field; 1256 - pix->colorspace = mf.colorspace; 1249 + pix->width = mf->width; 1250 + pix->height = mf->height; 1251 + pix->field = mf->field; 1252 + pix->colorspace = mf->colorspace; 1257 1253 1258 1254 dev_dbg(icd->parent, "%s: returned params: width = %d, height = %d\n", 1259 1255 __func__, pix->width, pix->height);
+16 -12
drivers/media/platform/soc_camera/mx3_camera.c
··· 912 912 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 913 913 const struct soc_camera_format_xlate *xlate; 914 914 struct v4l2_pix_format *pix = &f->fmt.pix; 915 - struct v4l2_mbus_framefmt mf; 915 + struct v4l2_subdev_pad_config pad_cfg; 916 + struct v4l2_subdev_format format = { 917 + .which = V4L2_SUBDEV_FORMAT_TRY, 918 + }; 919 + struct v4l2_mbus_framefmt *mf = &format.format; 916 920 __u32 pixfmt = pix->pixelformat; 917 921 int ret; 918 922 ··· 933 929 pix->width = 4096; 934 930 935 931 /* limit to sensor capabilities */ 936 - mf.width = pix->width; 937 - mf.height = pix->height; 938 - mf.field = pix->field; 939 - mf.colorspace = pix->colorspace; 940 - mf.code = xlate->code; 932 + mf->width = pix->width; 933 + mf->height = pix->height; 934 + mf->field = pix->field; 935 + mf->colorspace = pix->colorspace; 936 + mf->code = xlate->code; 941 937 942 - ret = v4l2_subdev_call(sd, video, try_mbus_fmt, &mf); 938 + ret = v4l2_subdev_call(sd, pad, set_fmt, &pad_cfg, &format); 943 939 if (ret < 0) 944 940 return ret; 945 941 946 - pix->width = mf.width; 947 - pix->height = mf.height; 948 - pix->colorspace = mf.colorspace; 942 + pix->width = mf->width; 943 + pix->height = mf->height; 944 + pix->colorspace = mf->colorspace; 949 945 950 - switch (mf.field) { 946 + switch (mf->field) { 951 947 case V4L2_FIELD_ANY: 952 948 pix->field = V4L2_FIELD_NONE; 953 949 break; ··· 955 951 break; 956 952 default: 957 953 dev_err(icd->parent, "Field type %d unsupported.\n", 958 - mf.field); 954 + mf->field); 959 955 ret = -EINVAL; 960 956 } 961 957
+15 -11
drivers/media/platform/soc_camera/omap1_camera.c
··· 1322 1322 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 1323 1323 const struct soc_camera_format_xlate *xlate; 1324 1324 struct v4l2_pix_format *pix = &f->fmt.pix; 1325 - struct v4l2_mbus_framefmt mf; 1325 + struct v4l2_subdev_pad_config pad_cfg; 1326 + struct v4l2_subdev_format format = { 1327 + .which = V4L2_SUBDEV_FORMAT_TRY, 1328 + }; 1329 + struct v4l2_mbus_framefmt *mf = &format.format; 1326 1330 int ret; 1327 1331 /* TODO: limit to mx1 hardware capabilities */ 1328 1332 ··· 1337 1333 return -EINVAL; 1338 1334 } 1339 1335 1340 - mf.width = pix->width; 1341 - mf.height = pix->height; 1342 - mf.field = pix->field; 1343 - mf.colorspace = pix->colorspace; 1344 - mf.code = xlate->code; 1336 + mf->width = pix->width; 1337 + mf->height = pix->height; 1338 + mf->field = pix->field; 1339 + mf->colorspace = pix->colorspace; 1340 + mf->code = xlate->code; 1345 1341 1346 1342 /* limit to sensor capabilities */ 1347 - ret = v4l2_subdev_call(sd, video, try_mbus_fmt, &mf); 1343 + ret = v4l2_subdev_call(sd, pad, set_fmt, &pad_cfg, &format); 1348 1344 if (ret < 0) 1349 1345 return ret; 1350 1346 1351 - pix->width = mf.width; 1352 - pix->height = mf.height; 1353 - pix->field = mf.field; 1354 - pix->colorspace = mf.colorspace; 1347 + pix->width = mf->width; 1348 + pix->height = mf->height; 1349 + pix->field = mf->field; 1350 + pix->colorspace = mf->colorspace; 1355 1351 1356 1352 return 0; 1357 1353 }
+16 -12
drivers/media/platform/soc_camera/pxa_camera.c
··· 1488 1488 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 1489 1489 const struct soc_camera_format_xlate *xlate; 1490 1490 struct v4l2_pix_format *pix = &f->fmt.pix; 1491 - struct v4l2_mbus_framefmt mf; 1491 + struct v4l2_subdev_pad_config pad_cfg; 1492 + struct v4l2_subdev_format format = { 1493 + .which = V4L2_SUBDEV_FORMAT_TRY, 1494 + }; 1495 + struct v4l2_mbus_framefmt *mf = &format.format; 1492 1496 __u32 pixfmt = pix->pixelformat; 1493 1497 int ret; 1494 1498 ··· 1513 1509 pixfmt == V4L2_PIX_FMT_YUV422P ? 4 : 0); 1514 1510 1515 1511 /* limit to sensor capabilities */ 1516 - mf.width = pix->width; 1517 - mf.height = pix->height; 1512 + mf->width = pix->width; 1513 + mf->height = pix->height; 1518 1514 /* Only progressive video supported so far */ 1519 - mf.field = V4L2_FIELD_NONE; 1520 - mf.colorspace = pix->colorspace; 1521 - mf.code = xlate->code; 1515 + mf->field = V4L2_FIELD_NONE; 1516 + mf->colorspace = pix->colorspace; 1517 + mf->code = xlate->code; 1522 1518 1523 - ret = v4l2_subdev_call(sd, video, try_mbus_fmt, &mf); 1519 + ret = v4l2_subdev_call(sd, pad, set_fmt, &pad_cfg, &format); 1524 1520 if (ret < 0) 1525 1521 return ret; 1526 1522 1527 - pix->width = mf.width; 1528 - pix->height = mf.height; 1529 - pix->colorspace = mf.colorspace; 1523 + pix->width = mf->width; 1524 + pix->height = mf->height; 1525 + pix->colorspace = mf->colorspace; 1530 1526 1531 - switch (mf.field) { 1527 + switch (mf->field) { 1532 1528 case V4L2_FIELD_ANY: 1533 1529 case V4L2_FIELD_NONE: 1534 1530 pix->field = V4L2_FIELD_NONE; ··· 1536 1532 default: 1537 1533 /* TODO: support interlaced at least in pass-through mode */ 1538 1534 dev_err(icd->parent, "Field type %d unsupported.\n", 1539 - mf.field); 1535 + mf->field); 1540 1536 return -EINVAL; 1541 1537 } 1542 1538
+23 -19
drivers/media/platform/soc_camera/rcar_vin.c
··· 1683 1683 const struct soc_camera_format_xlate *xlate; 1684 1684 struct v4l2_pix_format *pix = &f->fmt.pix; 1685 1685 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 1686 - struct v4l2_mbus_framefmt mf; 1686 + struct v4l2_subdev_pad_config pad_cfg; 1687 + struct v4l2_subdev_format format = { 1688 + .which = V4L2_SUBDEV_FORMAT_TRY, 1689 + }; 1690 + struct v4l2_mbus_framefmt *mf = &format.format; 1687 1691 __u32 pixfmt = pix->pixelformat; 1688 1692 int width, height; 1689 1693 int ret; ··· 1714 1710 pix->sizeimage = 0; 1715 1711 1716 1712 /* limit to sensor capabilities */ 1717 - mf.width = pix->width; 1718 - mf.height = pix->height; 1719 - mf.field = pix->field; 1720 - mf.code = xlate->code; 1721 - mf.colorspace = pix->colorspace; 1713 + mf->width = pix->width; 1714 + mf->height = pix->height; 1715 + mf->field = pix->field; 1716 + mf->code = xlate->code; 1717 + mf->colorspace = pix->colorspace; 1722 1718 1723 1719 ret = v4l2_device_call_until_err(sd->v4l2_dev, soc_camera_grp_id(icd), 1724 - video, try_mbus_fmt, &mf); 1720 + pad, set_fmt, &pad_cfg, &format); 1725 1721 if (ret < 0) 1726 1722 return ret; 1727 1723 1728 1724 /* Adjust only if VIN cannot scale */ 1729 - if (pix->width > mf.width * 2) 1730 - pix->width = mf.width * 2; 1731 - if (pix->height > mf.height * 3) 1732 - pix->height = mf.height * 3; 1725 + if (pix->width > mf->width * 2) 1726 + pix->width = mf->width * 2; 1727 + if (pix->height > mf->height * 3) 1728 + pix->height = mf->height * 3; 1733 1729 1734 - pix->field = mf.field; 1735 - pix->colorspace = mf.colorspace; 1730 + pix->field = mf->field; 1731 + pix->colorspace = mf->colorspace; 1736 1732 1737 1733 if (pixfmt == V4L2_PIX_FMT_NV16) { 1738 1734 /* FIXME: check against rect_max after converting soc-camera */ ··· 1743 1739 * requested a bigger rectangle, it will not return a 1744 1740 * smaller one. 1745 1741 */ 1746 - mf.width = VIN_MAX_WIDTH; 1747 - mf.height = VIN_MAX_HEIGHT; 1742 + mf->width = VIN_MAX_WIDTH; 1743 + mf->height = VIN_MAX_HEIGHT; 1748 1744 ret = v4l2_device_call_until_err(sd->v4l2_dev, 1749 1745 soc_camera_grp_id(icd), 1750 - video, try_mbus_fmt, 1751 - &mf); 1746 + pad, set_fmt, &pad_cfg, 1747 + &format); 1752 1748 if (ret < 0) { 1753 1749 dev_err(icd->parent, 1754 1750 "client try_fmt() = %d\n", ret); ··· 1756 1752 } 1757 1753 } 1758 1754 /* We will scale exactly */ 1759 - if (mf.width > width) 1755 + if (mf->width > width) 1760 1756 pix->width = width; 1761 - if (mf.height > height) 1757 + if (mf->height > height) 1762 1758 pix->height = height; 1763 1759 } 1764 1760
+21 -17
drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
··· 1499 1499 const struct soc_camera_format_xlate *xlate; 1500 1500 struct v4l2_pix_format *pix = &f->fmt.pix; 1501 1501 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 1502 - struct v4l2_mbus_framefmt mf; 1502 + struct v4l2_subdev_pad_config pad_cfg; 1503 + struct v4l2_subdev_format format = { 1504 + .which = V4L2_SUBDEV_FORMAT_TRY, 1505 + }; 1506 + struct v4l2_mbus_framefmt *mf = &format.format; 1503 1507 __u32 pixfmt = pix->pixelformat; 1504 1508 int width, height; 1505 1509 int ret; ··· 1531 1527 height = pix->height; 1532 1528 1533 1529 /* limit to sensor capabilities */ 1534 - mf.width = pix->width; 1535 - mf.height = pix->height; 1536 - mf.field = pix->field; 1537 - mf.code = xlate->code; 1538 - mf.colorspace = pix->colorspace; 1530 + mf->width = pix->width; 1531 + mf->height = pix->height; 1532 + mf->field = pix->field; 1533 + mf->code = xlate->code; 1534 + mf->colorspace = pix->colorspace; 1539 1535 1540 1536 ret = v4l2_device_call_until_err(sd->v4l2_dev, soc_camera_grp_id(icd), 1541 - video, try_mbus_fmt, &mf); 1537 + pad, set_fmt, &pad_cfg, &format); 1542 1538 if (ret < 0) 1543 1539 return ret; 1544 1540 1545 - pix->width = mf.width; 1546 - pix->height = mf.height; 1547 - pix->field = mf.field; 1548 - pix->colorspace = mf.colorspace; 1541 + pix->width = mf->width; 1542 + pix->height = mf->height; 1543 + pix->field = mf->field; 1544 + pix->colorspace = mf->colorspace; 1549 1545 1550 1546 switch (pixfmt) { 1551 1547 case V4L2_PIX_FMT_NV12: ··· 1560 1556 * requested a bigger rectangle, it will not return a 1561 1557 * smaller one. 1562 1558 */ 1563 - mf.width = pcdev->max_width; 1564 - mf.height = pcdev->max_height; 1559 + mf->width = pcdev->max_width; 1560 + mf->height = pcdev->max_height; 1565 1561 ret = v4l2_device_call_until_err(sd->v4l2_dev, 1566 - soc_camera_grp_id(icd), video, 1567 - try_mbus_fmt, &mf); 1562 + soc_camera_grp_id(icd), pad, 1563 + set_fmt, &pad_cfg, &format); 1568 1564 if (ret < 0) { 1569 1565 /* Shouldn't actually happen... */ 1570 1566 dev_err(icd->parent, ··· 1573 1569 } 1574 1570 } 1575 1571 /* We will scale exactly */ 1576 - if (mf.width > width) 1572 + if (mf->width > width) 1577 1573 pix->width = width; 1578 - if (mf.height > height) 1574 + if (mf->height > height) 1579 1575 pix->height = height; 1580 1576 1581 1577 pix->bytesperline = max(pix->bytesperline, pix->width);
+7 -4
drivers/media/platform/via-camera.c
··· 903 903 struct v4l2_pix_format *upix, struct v4l2_pix_format *spix) 904 904 { 905 905 int ret; 906 - struct v4l2_mbus_framefmt mbus_fmt; 906 + struct v4l2_subdev_pad_config pad_cfg; 907 + struct v4l2_subdev_format format = { 908 + .which = V4L2_SUBDEV_FORMAT_TRY, 909 + }; 907 910 struct via_format *f = via_find_format(upix->pixelformat); 908 911 909 912 upix->pixelformat = f->pixelformat; 910 913 viacam_fmt_pre(upix, spix); 911 - v4l2_fill_mbus_format(&mbus_fmt, spix, f->mbus_code); 912 - ret = sensor_call(cam, video, try_mbus_fmt, &mbus_fmt); 913 - v4l2_fill_pix_format(spix, &mbus_fmt); 914 + v4l2_fill_mbus_format(&format.format, spix, f->mbus_code); 915 + ret = sensor_call(cam, pad, set_fmt, &pad_cfg, &format); 916 + v4l2_fill_pix_format(spix, &format.format); 914 917 viacam_fmt_post(upix, spix); 915 918 return ret; 916 919 }