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

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

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

Remove the old try/s_mbus_fmt video ops since they are now no longer used.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Prabhakar Lad <prabhakar.csengg@gmail.com>
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
ebf984bb 5eab4983

+256 -222
+8 -5
drivers/media/pci/cx18/cx18-controls.c
··· 93 93 { 94 94 struct cx18 *cx = container_of(cxhdl, struct cx18, cxhdl); 95 95 int is_mpeg1 = val == V4L2_MPEG_VIDEO_ENCODING_MPEG_1; 96 - struct v4l2_mbus_framefmt fmt; 96 + struct v4l2_subdev_format format = { 97 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 98 + }; 99 + struct v4l2_mbus_framefmt *fmt = &format.format; 97 100 98 101 /* fix videodecoder resolution */ 99 - fmt.width = cxhdl->width / (is_mpeg1 ? 2 : 1); 100 - fmt.height = cxhdl->height; 101 - fmt.code = MEDIA_BUS_FMT_FIXED; 102 - v4l2_subdev_call(cx->sd_av, video, s_mbus_fmt, &fmt); 102 + fmt->width = cxhdl->width / (is_mpeg1 ? 2 : 1); 103 + fmt->height = cxhdl->height; 104 + fmt->code = MEDIA_BUS_FMT_FIXED; 105 + v4l2_subdev_call(cx->sd_av, pad, set_fmt, NULL, &format); 103 106 return 0; 104 107 } 105 108
+7 -5
drivers/media/pci/cx18/cx18-ioctl.c
··· 267 267 { 268 268 struct cx18_open_id *id = fh2id(fh); 269 269 struct cx18 *cx = id->cx; 270 - struct v4l2_mbus_framefmt mbus_fmt; 270 + struct v4l2_subdev_format format = { 271 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 272 + }; 271 273 struct cx18_stream *s = &cx->streams[id->type]; 272 274 int ret; 273 275 int w, h; ··· 298 296 s->vb_bytes_per_line = 1440; /* Packed */ 299 297 } 300 298 301 - mbus_fmt.width = cx->cxhdl.width = w; 302 - mbus_fmt.height = cx->cxhdl.height = h; 303 - mbus_fmt.code = MEDIA_BUS_FMT_FIXED; 304 - v4l2_subdev_call(cx->sd_av, video, s_mbus_fmt, &mbus_fmt); 299 + format.format.width = cx->cxhdl.width = w; 300 + format.format.height = cx->cxhdl.height = h; 301 + format.format.code = MEDIA_BUS_FMT_FIXED; 302 + v4l2_subdev_call(cx->sd_av, pad, set_fmt, NULL, &format); 305 303 return cx18_g_fmt_vid_cap(file, fh, fmt); 306 304 } 307 305
+7 -5
drivers/media/pci/cx23885/cx23885-video.c
··· 581 581 struct v4l2_format *f) 582 582 { 583 583 struct cx23885_dev *dev = video_drvdata(file); 584 - struct v4l2_mbus_framefmt mbus_fmt; 584 + struct v4l2_subdev_format format = { 585 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 586 + }; 585 587 int err; 586 588 587 589 dprintk(2, "%s()\n", __func__); ··· 602 600 dev->field = f->fmt.pix.field; 603 601 dprintk(2, "%s() width=%d height=%d field=%d\n", __func__, 604 602 dev->width, dev->height, dev->field); 605 - v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, MEDIA_BUS_FMT_FIXED); 606 - call_all(dev, video, s_mbus_fmt, &mbus_fmt); 607 - v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt); 608 - /* s_mbus_fmt overwrites f->fmt.pix.field, restore it */ 603 + v4l2_fill_mbus_format(&format.format, &f->fmt.pix, MEDIA_BUS_FMT_FIXED); 604 + call_all(dev, pad, set_fmt, NULL, &format); 605 + v4l2_fill_pix_format(&f->fmt.pix, &format.format); 606 + /* set_fmt overwrites f->fmt.pix.field, restore it */ 609 607 f->fmt.pix.field = dev->field; 610 608 return 0; 611 609 }
+7 -5
drivers/media/pci/ivtv/ivtv-controls.c
··· 64 64 { 65 65 struct ivtv *itv = container_of(cxhdl, struct ivtv, cxhdl); 66 66 int is_mpeg1 = val == V4L2_MPEG_VIDEO_ENCODING_MPEG_1; 67 - struct v4l2_mbus_framefmt fmt; 67 + struct v4l2_subdev_format format = { 68 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 69 + }; 68 70 69 71 /* fix videodecoder resolution */ 70 - fmt.width = cxhdl->width / (is_mpeg1 ? 2 : 1); 71 - fmt.height = cxhdl->height; 72 - fmt.code = MEDIA_BUS_FMT_FIXED; 73 - v4l2_subdev_call(itv->sd_video, video, s_mbus_fmt, &fmt); 72 + format.format.width = cxhdl->width / (is_mpeg1 ? 2 : 1); 73 + format.format.height = cxhdl->height; 74 + format.format.code = MEDIA_BUS_FMT_FIXED; 75 + v4l2_subdev_call(itv->sd_video, pad, set_fmt, NULL, &format); 74 76 return 0; 75 77 } 76 78
+7 -5
drivers/media/pci/ivtv/ivtv-ioctl.c
··· 581 581 { 582 582 struct ivtv_open_id *id = fh2id(fh); 583 583 struct ivtv *itv = id->itv; 584 - struct v4l2_mbus_framefmt mbus_fmt; 584 + struct v4l2_subdev_format format = { 585 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 586 + }; 585 587 int ret = ivtv_try_fmt_vid_cap(file, fh, fmt); 586 588 int w = fmt->fmt.pix.width; 587 589 int h = fmt->fmt.pix.height; ··· 601 599 itv->cxhdl.height = h; 602 600 if (v4l2_ctrl_g_ctrl(itv->cxhdl.video_encoding) == V4L2_MPEG_VIDEO_ENCODING_MPEG_1) 603 601 fmt->fmt.pix.width /= 2; 604 - mbus_fmt.width = fmt->fmt.pix.width; 605 - mbus_fmt.height = h; 606 - mbus_fmt.code = MEDIA_BUS_FMT_FIXED; 607 - v4l2_subdev_call(itv->sd_video, video, s_mbus_fmt, &mbus_fmt); 602 + format.format.width = fmt->fmt.pix.width; 603 + format.format.height = h; 604 + format.format.code = MEDIA_BUS_FMT_FIXED; 605 + v4l2_subdev_call(itv->sd_video, pad, set_fmt, NULL, &format); 608 606 return ivtv_g_fmt_vid_cap(file, fh, fmt); 609 607 } 610 608
+6 -4
drivers/media/pci/saa7134/saa7134-empress.c
··· 140 140 struct v4l2_format *f) 141 141 { 142 142 struct saa7134_dev *dev = video_drvdata(file); 143 - struct v4l2_mbus_framefmt mbus_fmt; 143 + struct v4l2_subdev_format format = { 144 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 145 + }; 144 146 145 - v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, MEDIA_BUS_FMT_FIXED); 146 - saa_call_all(dev, video, s_mbus_fmt, &mbus_fmt); 147 - v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt); 147 + v4l2_fill_mbus_format(&format.format, &f->fmt.pix, MEDIA_BUS_FMT_FIXED); 148 + saa_call_all(dev, pad, set_fmt, NULL, &format); 149 + v4l2_fill_pix_format(&f->fmt.pix, &format.format); 148 150 149 151 f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG; 150 152 f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
+3 -16
drivers/media/platform/am437x/am437x-vpfe.c
··· 1455 1455 static int __vpfe_set_format(struct vpfe_device *vpfe, 1456 1456 struct v4l2_format *format, unsigned int *bpp) 1457 1457 { 1458 - struct v4l2_mbus_framefmt mbus_fmt; 1459 1458 struct vpfe_subdev_info *sdinfo; 1460 1459 struct v4l2_subdev_format fmt; 1461 1460 int ret; ··· 1471 1472 pix_to_mbus(vpfe, &format->fmt.pix, &fmt.format); 1472 1473 1473 1474 ret = v4l2_subdev_call(sdinfo->sd, pad, set_fmt, NULL, &fmt); 1474 - if (ret && ret != -ENOIOCTLCMD && ret != -ENODEV) 1475 + if (ret) 1475 1476 return ret; 1476 1477 1477 - if (!ret) { 1478 - v4l2_fill_pix_format(&format->fmt.pix, &fmt.format); 1479 - mbus_to_pix(vpfe, &fmt.format, &format->fmt.pix, bpp); 1480 - } else { 1481 - ret = v4l2_device_call_until_err(&vpfe->v4l2_dev, 1482 - sdinfo->grp_id, 1483 - video, s_mbus_fmt, 1484 - &mbus_fmt); 1485 - if (ret && ret != -ENOIOCTLCMD && ret != -ENODEV) 1486 - return ret; 1487 - 1488 - v4l2_fill_pix_format(&format->fmt.pix, &mbus_fmt); 1489 - mbus_to_pix(vpfe, &mbus_fmt, &format->fmt.pix, bpp); 1490 - } 1478 + v4l2_fill_pix_format(&format->fmt.pix, &fmt.format); 1479 + mbus_to_pix(vpfe, &fmt.format, &format->fmt.pix, bpp); 1491 1480 1492 1481 format->type = vpfe->fmt.type; 1493 1482
+5 -3
drivers/media/platform/blackfin/bfin_capture.c
··· 674 674 struct v4l2_format *fmt) 675 675 { 676 676 struct bcap_device *bcap_dev = video_drvdata(file); 677 - struct v4l2_mbus_framefmt mbus_fmt; 677 + struct v4l2_subdev_format format = { 678 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 679 + }; 678 680 struct bcap_format bcap_fmt; 679 681 struct v4l2_pix_format *pixfmt = &fmt->fmt.pix; 680 682 int ret; ··· 689 687 if (ret < 0) 690 688 return ret; 691 689 692 - v4l2_fill_mbus_format(&mbus_fmt, pixfmt, bcap_fmt.mbus_code); 693 - ret = v4l2_subdev_call(bcap_dev->sd, video, s_mbus_fmt, &mbus_fmt); 690 + v4l2_fill_mbus_format(&format.format, pixfmt, bcap_fmt.mbus_code); 691 + ret = v4l2_subdev_call(bcap_dev->sd, pad, set_fmt, NULL, &format); 694 692 if (ret < 0) 695 693 return ret; 696 694 bcap_dev->fmt = *pixfmt;
+5 -3
drivers/media/platform/marvell-ccic/mcam-core.c
··· 979 979 980 980 static int mcam_cam_configure(struct mcam_camera *cam) 981 981 { 982 - struct v4l2_mbus_framefmt mbus_fmt; 982 + struct v4l2_subdev_format format = { 983 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 984 + }; 983 985 int ret; 984 986 985 - v4l2_fill_mbus_format(&mbus_fmt, &cam->pix_format, cam->mbus_code); 987 + v4l2_fill_mbus_format(&format.format, &cam->pix_format, cam->mbus_code); 986 988 ret = sensor_call(cam, core, init, 0); 987 989 if (ret == 0) 988 - ret = sensor_call(cam, video, s_mbus_fmt, &mbus_fmt); 990 + ret = sensor_call(cam, pad, set_fmt, NULL, &format); 989 991 /* 990 992 * OV7670 does weird things if flip is set *before* format... 991 993 */
+32 -29
drivers/media/platform/sh_vou.c
··· 679 679 unsigned int img_height_max; 680 680 int pix_idx; 681 681 struct sh_vou_geometry geo; 682 - struct v4l2_mbus_framefmt mbfmt = { 682 + struct v4l2_subdev_format format = { 683 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 683 684 /* Revisit: is this the correct code? */ 684 - .code = MEDIA_BUS_FMT_YUYV8_2X8, 685 - .field = V4L2_FIELD_INTERLACED, 686 - .colorspace = V4L2_COLORSPACE_SMPTE170M, 685 + .format.code = MEDIA_BUS_FMT_YUYV8_2X8, 686 + .format.field = V4L2_FIELD_INTERLACED, 687 + .format.colorspace = V4L2_COLORSPACE_SMPTE170M, 687 688 }; 689 + struct v4l2_mbus_framefmt *mbfmt = &format.format; 688 690 int ret; 689 691 690 692 dev_dbg(vou_dev->v4l2_dev.dev, "%s(): %ux%u -> %ux%u\n", __func__, ··· 722 720 723 721 vou_adjust_output(&geo, vou_dev->std); 724 722 725 - mbfmt.width = geo.output.width; 726 - mbfmt.height = geo.output.height; 727 - ret = v4l2_device_call_until_err(&vou_dev->v4l2_dev, 0, video, 728 - s_mbus_fmt, &mbfmt); 723 + mbfmt->width = geo.output.width; 724 + mbfmt->height = geo.output.height; 725 + ret = v4l2_device_call_until_err(&vou_dev->v4l2_dev, 0, pad, 726 + set_fmt, NULL, &format); 729 727 /* Must be implemented, so, don't check for -ENOIOCTLCMD */ 730 728 if (ret < 0) 731 729 return ret; 732 730 733 731 dev_dbg(vou_dev->v4l2_dev.dev, "%s(): %ux%u -> %ux%u\n", __func__, 734 - geo.output.width, geo.output.height, mbfmt.width, mbfmt.height); 732 + geo.output.width, geo.output.height, mbfmt->width, mbfmt->height); 735 733 736 734 /* Sanity checks */ 737 - if ((unsigned)mbfmt.width > VOU_MAX_IMAGE_WIDTH || 738 - (unsigned)mbfmt.height > img_height_max || 739 - mbfmt.code != MEDIA_BUS_FMT_YUYV8_2X8) 735 + if ((unsigned)mbfmt->width > VOU_MAX_IMAGE_WIDTH || 736 + (unsigned)mbfmt->height > img_height_max || 737 + mbfmt->code != MEDIA_BUS_FMT_YUYV8_2X8) 740 738 return -EIO; 741 739 742 - if (mbfmt.width != geo.output.width || 743 - mbfmt.height != geo.output.height) { 744 - geo.output.width = mbfmt.width; 745 - geo.output.height = mbfmt.height; 740 + if (mbfmt->width != geo.output.width || 741 + mbfmt->height != geo.output.height) { 742 + geo.output.width = mbfmt->width; 743 + geo.output.height = mbfmt->height; 746 744 747 745 vou_adjust_input(&geo, vou_dev->std); 748 746 } ··· 944 942 struct v4l2_crop sd_crop = {.type = V4L2_BUF_TYPE_VIDEO_OUTPUT}; 945 943 struct v4l2_pix_format *pix = &vou_dev->pix; 946 944 struct sh_vou_geometry geo; 947 - struct v4l2_mbus_framefmt mbfmt = { 945 + struct v4l2_subdev_format format = { 946 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 948 947 /* Revisit: is this the correct code? */ 949 - .code = MEDIA_BUS_FMT_YUYV8_2X8, 950 - .field = V4L2_FIELD_INTERLACED, 951 - .colorspace = V4L2_COLORSPACE_SMPTE170M, 948 + .format.code = MEDIA_BUS_FMT_YUYV8_2X8, 949 + .format.field = V4L2_FIELD_INTERLACED, 950 + .format.colorspace = V4L2_COLORSPACE_SMPTE170M, 952 951 }; 953 952 unsigned int img_height_max; 954 953 int ret; ··· 987 984 */ 988 985 v4l2_device_call_until_err(&vou_dev->v4l2_dev, 0, video, 989 986 s_crop, &sd_crop); 990 - mbfmt.width = geo.output.width; 991 - mbfmt.height = geo.output.height; 992 - ret = v4l2_device_call_until_err(&vou_dev->v4l2_dev, 0, video, 993 - s_mbus_fmt, &mbfmt); 987 + format.format.width = geo.output.width; 988 + format.format.height = geo.output.height; 989 + ret = v4l2_device_call_until_err(&vou_dev->v4l2_dev, 0, pad, 990 + set_fmt, NULL, &format); 994 991 /* Must be implemented, so, don't check for -ENOIOCTLCMD */ 995 992 if (ret < 0) 996 993 return ret; 997 994 998 995 /* Sanity checks */ 999 - if ((unsigned)mbfmt.width > VOU_MAX_IMAGE_WIDTH || 1000 - (unsigned)mbfmt.height > img_height_max || 1001 - mbfmt.code != MEDIA_BUS_FMT_YUYV8_2X8) 996 + if ((unsigned)format.format.width > VOU_MAX_IMAGE_WIDTH || 997 + (unsigned)format.format.height > img_height_max || 998 + format.format.code != MEDIA_BUS_FMT_YUYV8_2X8) 1002 999 return -EIO; 1003 1000 1004 - geo.output.width = mbfmt.width; 1005 - geo.output.height = mbfmt.height; 1001 + geo.output.width = format.format.width; 1002 + geo.output.height = format.format.height; 1006 1003 1007 1004 /* 1008 1005 * No down-scaling. According to the API, current call has precedence:
+15 -12
drivers/media/platform/soc_camera/atmel-isi.c
··· 487 487 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 488 488 const struct soc_camera_format_xlate *xlate; 489 489 struct v4l2_pix_format *pix = &f->fmt.pix; 490 - struct v4l2_mbus_framefmt mf; 490 + struct v4l2_subdev_format format = { 491 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 492 + }; 493 + struct v4l2_mbus_framefmt *mf = &format.format; 491 494 int ret; 492 495 493 496 xlate = soc_camera_xlate_by_fourcc(icd, pix->pixelformat); ··· 503 500 dev_dbg(icd->parent, "Plan to set format %dx%d\n", 504 501 pix->width, pix->height); 505 502 506 - mf.width = pix->width; 507 - mf.height = pix->height; 508 - mf.field = pix->field; 509 - mf.colorspace = pix->colorspace; 510 - mf.code = xlate->code; 503 + mf->width = pix->width; 504 + mf->height = pix->height; 505 + mf->field = pix->field; 506 + mf->colorspace = pix->colorspace; 507 + mf->code = xlate->code; 511 508 512 - ret = v4l2_subdev_call(sd, video, s_mbus_fmt, &mf); 509 + ret = v4l2_subdev_call(sd, pad, set_fmt, NULL, &format); 513 510 if (ret < 0) 514 511 return ret; 515 512 516 - if (mf.code != xlate->code) 513 + if (mf->code != xlate->code) 517 514 return -EINVAL; 518 515 519 516 ret = configure_geometry(isi, pix->width, pix->height, xlate->code); 520 517 if (ret < 0) 521 518 return ret; 522 519 523 - pix->width = mf.width; 524 - pix->height = mf.height; 525 - pix->field = mf.field; 526 - pix->colorspace = mf.colorspace; 520 + pix->width = mf->width; 521 + pix->height = mf->height; 522 + pix->field = mf->field; 523 + pix->colorspace = mf->colorspace; 527 524 icd->current_fmt = xlate; 528 525 529 526 dev_dbg(icd->parent, "Finally set format %dx%d\n",
+19 -16
drivers/media/platform/soc_camera/mx2_camera.c
··· 1127 1127 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 1128 1128 const struct soc_camera_format_xlate *xlate; 1129 1129 struct v4l2_pix_format *pix = &f->fmt.pix; 1130 - struct v4l2_mbus_framefmt mf; 1130 + struct v4l2_subdev_format format = { 1131 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 1132 + }; 1133 + struct v4l2_mbus_framefmt *mf = &format.format; 1131 1134 int ret; 1132 1135 1133 1136 dev_dbg(icd->parent, "%s: requested params: width = %d, height = %d\n", ··· 1143 1140 return -EINVAL; 1144 1141 } 1145 1142 1146 - mf.width = pix->width; 1147 - mf.height = pix->height; 1148 - mf.field = pix->field; 1149 - mf.colorspace = pix->colorspace; 1150 - mf.code = xlate->code; 1143 + mf->width = pix->width; 1144 + mf->height = pix->height; 1145 + mf->field = pix->field; 1146 + mf->colorspace = pix->colorspace; 1147 + mf->code = xlate->code; 1151 1148 1152 - ret = v4l2_subdev_call(sd, video, s_mbus_fmt, &mf); 1149 + ret = v4l2_subdev_call(sd, pad, set_fmt, NULL, &format); 1153 1150 if (ret < 0 && ret != -ENOIOCTLCMD) 1154 1151 return ret; 1155 1152 1156 1153 /* Store width and height returned by the sensor for resizing */ 1157 - pcdev->s_width = mf.width; 1158 - pcdev->s_height = mf.height; 1154 + pcdev->s_width = mf->width; 1155 + pcdev->s_height = mf->height; 1159 1156 dev_dbg(icd->parent, "%s: sensor params: width = %d, height = %d\n", 1160 1157 __func__, pcdev->s_width, pcdev->s_height); 1161 1158 ··· 1163 1160 xlate->host_fmt->fourcc); 1164 1161 1165 1162 memset(pcdev->resizing, 0, sizeof(pcdev->resizing)); 1166 - if ((mf.width != pix->width || mf.height != pix->height) && 1163 + if ((mf->width != pix->width || mf->height != pix->height) && 1167 1164 pcdev->emma_prp->cfg.in_fmt == PRP_CNTL_DATA_IN_YUV422) { 1168 - if (mx2_emmaprp_resize(pcdev, &mf, pix, true) < 0) 1165 + if (mx2_emmaprp_resize(pcdev, mf, pix, true) < 0) 1169 1166 dev_dbg(icd->parent, "%s: can't resize\n", __func__); 1170 1167 } 1171 1168 1172 - if (mf.code != xlate->code) 1169 + if (mf->code != xlate->code) 1173 1170 return -EINVAL; 1174 1171 1175 - pix->width = mf.width; 1176 - pix->height = mf.height; 1177 - pix->field = mf.field; 1178 - pix->colorspace = mf.colorspace; 1172 + pix->width = mf->width; 1173 + pix->height = mf->height; 1174 + pix->field = mf->field; 1175 + pix->colorspace = mf->colorspace; 1179 1176 icd->current_fmt = xlate; 1180 1177 1181 1178 dev_dbg(icd->parent, "%s: returned params: width = %d, height = %d\n",
+17 -14
drivers/media/platform/soc_camera/mx3_camera.c
··· 828 828 if (mf->width & 7) { 829 829 /* Ouch! We can only handle 8-byte aligned width... */ 830 830 stride_align(&mf->width); 831 - ret = v4l2_subdev_call(sd, video, s_mbus_fmt, mf); 831 + ret = v4l2_subdev_call(sd, pad, set_fmt, NULL, &fmt); 832 832 if (ret < 0) 833 833 return ret; 834 834 } ··· 854 854 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 855 855 const struct soc_camera_format_xlate *xlate; 856 856 struct v4l2_pix_format *pix = &f->fmt.pix; 857 - struct v4l2_mbus_framefmt mf; 857 + struct v4l2_subdev_format format = { 858 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 859 + }; 860 + struct v4l2_mbus_framefmt *mf = &format.format; 858 861 int ret; 859 862 860 863 xlate = soc_camera_xlate_by_fourcc(icd, pix->pixelformat); ··· 878 875 879 876 configure_geometry(mx3_cam, pix->width, pix->height, xlate->host_fmt); 880 877 881 - mf.width = pix->width; 882 - mf.height = pix->height; 883 - mf.field = pix->field; 884 - mf.colorspace = pix->colorspace; 885 - mf.code = xlate->code; 878 + mf->width = pix->width; 879 + mf->height = pix->height; 880 + mf->field = pix->field; 881 + mf->colorspace = pix->colorspace; 882 + mf->code = xlate->code; 886 883 887 - ret = v4l2_subdev_call(sd, video, s_mbus_fmt, &mf); 884 + ret = v4l2_subdev_call(sd, pad, set_fmt, NULL, &format); 888 885 if (ret < 0) 889 886 return ret; 890 887 891 - if (mf.code != xlate->code) 888 + if (mf->code != xlate->code) 892 889 return -EINVAL; 893 890 894 891 if (!mx3_cam->idmac_channel[0]) { ··· 897 894 return ret; 898 895 } 899 896 900 - pix->width = mf.width; 901 - pix->height = mf.height; 902 - pix->field = mf.field; 903 - mx3_cam->field = mf.field; 904 - pix->colorspace = mf.colorspace; 897 + pix->width = mf->width; 898 + pix->height = mf->height; 899 + pix->field = mf->field; 900 + mx3_cam->field = mf->field; 901 + pix->colorspace = mf->colorspace; 905 902 icd->current_fmt = xlate; 906 903 907 904 dev_dbg(icd->parent, "Sensor set %dx%d\n", pix->width, pix->height);
+24 -20
drivers/media/platform/soc_camera/omap1_camera.c
··· 1157 1157 return 1; 1158 1158 } 1159 1159 1160 - #define subdev_call_with_sense(pcdev, dev, icd, sd, function, args...) \ 1160 + #define subdev_call_with_sense(pcdev, dev, icd, sd, op, function, args...) \ 1161 1161 ({ \ 1162 1162 struct soc_camera_sense sense = { \ 1163 1163 .master_clock = pcdev->camexclk, \ ··· 1168 1168 if (pcdev->pdata) \ 1169 1169 sense.pixel_clock_max = pcdev->pdata->lclk_khz_max * 1000; \ 1170 1170 icd->sense = &sense; \ 1171 - __ret = v4l2_subdev_call(sd, video, function, ##args); \ 1171 + __ret = v4l2_subdev_call(sd, op, function, ##args); \ 1172 1172 icd->sense = NULL; \ 1173 1173 \ 1174 1174 if (sense.flags & SOCAM_SENSE_PCLK_CHANGED) { \ ··· 1182 1182 __ret; \ 1183 1183 }) 1184 1184 1185 - static int set_mbus_format(struct omap1_cam_dev *pcdev, struct device *dev, 1185 + static int set_format(struct omap1_cam_dev *pcdev, struct device *dev, 1186 1186 struct soc_camera_device *icd, struct v4l2_subdev *sd, 1187 - struct v4l2_mbus_framefmt *mf, 1187 + struct v4l2_subdev_format *format, 1188 1188 const struct soc_camera_format_xlate *xlate) 1189 1189 { 1190 1190 s32 bytes_per_line; 1191 - int ret = subdev_call_with_sense(pcdev, dev, icd, sd, s_mbus_fmt, mf); 1191 + struct v4l2_mbus_framefmt *mf = &format->format; 1192 + int ret = subdev_call_with_sense(pcdev, dev, icd, sd, pad, set_fmt, NULL, format); 1192 1193 1193 1194 if (ret < 0) { 1194 - dev_err(dev, "%s: s_mbus_fmt failed\n", __func__); 1195 + dev_err(dev, "%s: set_fmt failed\n", __func__); 1195 1196 return ret; 1196 1197 } 1197 1198 ··· 1231 1230 struct v4l2_mbus_framefmt *mf = &fmt.format; 1232 1231 int ret; 1233 1232 1234 - ret = subdev_call_with_sense(pcdev, dev, icd, sd, s_crop, crop); 1233 + ret = subdev_call_with_sense(pcdev, dev, icd, sd, video, s_crop, crop); 1235 1234 if (ret < 0) { 1236 1235 dev_warn(dev, "%s: failed to crop to %ux%u@%u:%u\n", __func__, 1237 1236 rect->width, rect->height, rect->left, rect->top); ··· 1255 1254 1256 1255 if (!ret) { 1257 1256 /* sensor returned geometry not DMA aligned, trying to fix */ 1258 - ret = set_mbus_format(pcdev, dev, icd, sd, mf, xlate); 1257 + ret = set_format(pcdev, dev, icd, sd, &fmt, xlate); 1259 1258 if (ret < 0) { 1260 1259 dev_err(dev, "%s: failed to set format\n", __func__); 1261 1260 return ret; ··· 1277 1276 struct soc_camera_host *ici = to_soc_camera_host(dev); 1278 1277 struct omap1_cam_dev *pcdev = ici->priv; 1279 1278 struct v4l2_pix_format *pix = &f->fmt.pix; 1280 - struct v4l2_mbus_framefmt mf; 1279 + struct v4l2_subdev_format format = { 1280 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 1281 + }; 1282 + struct v4l2_mbus_framefmt *mf = &format.format; 1281 1283 int ret; 1282 1284 1283 1285 xlate = soc_camera_xlate_by_fourcc(icd, pix->pixelformat); ··· 1290 1286 return -EINVAL; 1291 1287 } 1292 1288 1293 - mf.width = pix->width; 1294 - mf.height = pix->height; 1295 - mf.field = pix->field; 1296 - mf.colorspace = pix->colorspace; 1297 - mf.code = xlate->code; 1289 + mf->width = pix->width; 1290 + mf->height = pix->height; 1291 + mf->field = pix->field; 1292 + mf->colorspace = pix->colorspace; 1293 + mf->code = xlate->code; 1298 1294 1299 - ret = dma_align(&mf.width, &mf.height, xlate->host_fmt, pcdev->vb_mode, 1295 + ret = dma_align(&mf->width, &mf->height, xlate->host_fmt, pcdev->vb_mode, 1300 1296 true); 1301 1297 if (ret < 0) { 1302 1298 dev_err(dev, "%s: failed to align %ux%u %s with DMA\n", ··· 1305 1301 return ret; 1306 1302 } 1307 1303 1308 - ret = set_mbus_format(pcdev, dev, icd, sd, &mf, xlate); 1304 + ret = set_format(pcdev, dev, icd, sd, &format, xlate); 1309 1305 if (ret < 0) { 1310 1306 dev_err(dev, "%s: failed to set format\n", __func__); 1311 1307 return ret; 1312 1308 } 1313 1309 1314 - pix->width = mf.width; 1315 - pix->height = mf.height; 1316 - pix->field = mf.field; 1317 - pix->colorspace = mf.colorspace; 1310 + pix->width = mf->width; 1311 + pix->height = mf->height; 1312 + pix->field = mf->field; 1313 + pix->colorspace = mf->colorspace; 1318 1314 icd->current_fmt = xlate; 1319 1315 1320 1316 return 0;
+18 -15
drivers/media/platform/soc_camera/pxa_camera.c
··· 1383 1383 v4l_bound_align_image(&mf->width, 48, 2048, 1, 1384 1384 &mf->height, 32, 2048, 0, 1385 1385 fourcc == V4L2_PIX_FMT_YUV422P ? 4 : 0); 1386 - ret = v4l2_subdev_call(sd, video, s_mbus_fmt, mf); 1386 + ret = v4l2_subdev_call(sd, pad, set_fmt, NULL, &fmt); 1387 1387 if (ret < 0) 1388 1388 return ret; 1389 1389 ··· 1425 1425 .pixel_clock_max = pcdev->ciclk / 4, 1426 1426 }; 1427 1427 struct v4l2_pix_format *pix = &f->fmt.pix; 1428 - struct v4l2_mbus_framefmt mf; 1428 + struct v4l2_subdev_format format = { 1429 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 1430 + }; 1431 + struct v4l2_mbus_framefmt *mf = &format.format; 1429 1432 int ret; 1430 1433 1431 1434 xlate = soc_camera_xlate_by_fourcc(icd, pix->pixelformat); ··· 1442 1439 /* The caller holds a mutex. */ 1443 1440 icd->sense = &sense; 1444 1441 1445 - mf.width = pix->width; 1446 - mf.height = pix->height; 1447 - mf.field = pix->field; 1448 - mf.colorspace = pix->colorspace; 1449 - mf.code = xlate->code; 1442 + mf->width = pix->width; 1443 + mf->height = pix->height; 1444 + mf->field = pix->field; 1445 + mf->colorspace = pix->colorspace; 1446 + mf->code = xlate->code; 1450 1447 1451 - ret = v4l2_subdev_call(sd, video, s_mbus_fmt, &mf); 1448 + ret = v4l2_subdev_call(sd, pad, set_fmt, NULL, &format); 1452 1449 1453 - if (mf.code != xlate->code) 1450 + if (mf->code != xlate->code) 1454 1451 return -EINVAL; 1455 1452 1456 1453 icd->sense = NULL; ··· 1458 1455 if (ret < 0) { 1459 1456 dev_warn(dev, "Failed to configure for format %x\n", 1460 1457 pix->pixelformat); 1461 - } else if (pxa_camera_check_frame(mf.width, mf.height)) { 1458 + } else if (pxa_camera_check_frame(mf->width, mf->height)) { 1462 1459 dev_warn(dev, 1463 1460 "Camera driver produced an unsupported frame %dx%d\n", 1464 - mf.width, mf.height); 1461 + mf->width, mf->height); 1465 1462 ret = -EINVAL; 1466 1463 } else if (sense.flags & SOCAM_SENSE_PCLK_CHANGED) { 1467 1464 if (sense.pixel_clock > sense.pixel_clock_max) { ··· 1476 1473 if (ret < 0) 1477 1474 return ret; 1478 1475 1479 - pix->width = mf.width; 1480 - pix->height = mf.height; 1481 - pix->field = mf.field; 1482 - pix->colorspace = mf.colorspace; 1476 + pix->width = mf->width; 1477 + pix->height = mf->height; 1478 + pix->field = mf->field; 1479 + pix->colorspace = mf->colorspace; 1483 1480 icd->current_fmt = xlate; 1484 1481 1485 1482 return ret;
+2 -2
drivers/media/platform/soc_camera/rcar_vin.c
··· 1376 1376 mf->height = 960 >> shift; 1377 1377 ret = v4l2_device_call_until_err(sd->v4l2_dev, 1378 1378 soc_camera_grp_id(icd), 1379 - video, s_mbus_fmt, 1380 - mf); 1379 + pad, set_fmt, NULL, 1380 + &fmt); 1381 1381 if (ret < 0) 1382 1382 return ret; 1383 1383 }
+4 -4
drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c
··· 1111 1111 mf->width = 2560 >> shift; 1112 1112 mf->height = 1920 >> shift; 1113 1113 ret = v4l2_device_call_until_err(sd->v4l2_dev, 1114 - soc_camera_grp_id(icd), video, 1115 - s_mbus_fmt, mf); 1114 + soc_camera_grp_id(icd), pad, 1115 + set_fmt, NULL, &fmt); 1116 1116 if (ret < 0) 1117 1117 return ret; 1118 1118 shift++; ··· 1286 1286 1287 1287 if (interm_width < icd->user_width || interm_height < icd->user_height) { 1288 1288 ret = v4l2_device_call_until_err(sd->v4l2_dev, 1289 - soc_camera_grp_id(icd), video, 1290 - s_mbus_fmt, mf); 1289 + soc_camera_grp_id(icd), pad, 1290 + set_fmt, NULL, &fmt); 1291 1291 if (ret < 0) 1292 1292 return ret; 1293 1293
+21 -16
drivers/media/platform/soc_camera/soc_scale_crop.c
··· 211 211 } 212 212 EXPORT_SYMBOL(soc_camera_client_s_crop); 213 213 214 - /* Iterative s_mbus_fmt, also updates cached client crop on success */ 215 - static int client_s_fmt(struct soc_camera_device *icd, 214 + /* Iterative set_fmt, also updates cached client crop on success */ 215 + static int client_set_fmt(struct soc_camera_device *icd, 216 216 struct v4l2_rect *rect, struct v4l2_rect *subrect, 217 217 unsigned int max_width, unsigned int max_height, 218 - struct v4l2_mbus_framefmt *mf, bool host_can_scale) 218 + struct v4l2_subdev_format *format, bool host_can_scale) 219 219 { 220 220 struct v4l2_subdev *sd = soc_camera_to_subdev(icd); 221 221 struct device *dev = icd->parent; 222 + struct v4l2_mbus_framefmt *mf = &format->format; 222 223 unsigned int width = mf->width, height = mf->height, tmp_w, tmp_h; 223 224 struct v4l2_cropcap cap; 224 225 bool host_1to1; 225 226 int ret; 226 227 227 228 ret = v4l2_device_call_until_err(sd->v4l2_dev, 228 - soc_camera_grp_id(icd), video, 229 - s_mbus_fmt, mf); 229 + soc_camera_grp_id(icd), pad, 230 + set_fmt, NULL, format); 230 231 if (ret < 0) 231 232 return ret; 232 233 ··· 266 265 mf->width = tmp_w; 267 266 mf->height = tmp_h; 268 267 ret = v4l2_device_call_until_err(sd->v4l2_dev, 269 - soc_camera_grp_id(icd), video, 270 - s_mbus_fmt, mf); 268 + soc_camera_grp_id(icd), pad, 269 + set_fmt, NULL, format); 271 270 dev_geo(dev, "Camera scaled to %ux%u\n", 272 271 mf->width, mf->height); 273 272 if (ret < 0) { ··· 310 309 bool host_can_scale, unsigned int shift) 311 310 { 312 311 struct device *dev = icd->parent; 313 - struct v4l2_mbus_framefmt mf_tmp = *mf; 312 + struct v4l2_subdev_format fmt_tmp = { 313 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 314 + .format = *mf, 315 + }; 316 + struct v4l2_mbus_framefmt *mf_tmp = &fmt_tmp.format; 314 317 unsigned int scale_h, scale_v; 315 318 int ret; 316 319 ··· 322 317 * 5. Apply iterative camera S_FMT for camera user window (also updates 323 318 * client crop cache and the imaginary sub-rectangle). 324 319 */ 325 - ret = client_s_fmt(icd, rect, subrect, *width, *height, 326 - &mf_tmp, host_can_scale); 320 + ret = client_set_fmt(icd, rect, subrect, *width, *height, 321 + &fmt_tmp, host_can_scale); 327 322 if (ret < 0) 328 323 return ret; 329 324 330 325 dev_geo(dev, "5: camera scaled to %ux%u\n", 331 - mf_tmp.width, mf_tmp.height); 326 + mf_tmp->width, mf_tmp->height); 332 327 333 328 /* 6. Retrieve camera output window (g_fmt) */ 334 329 335 330 /* unneeded - it is already in "mf_tmp" */ 336 331 337 332 /* 7. Calculate new client scales. */ 338 - scale_h = soc_camera_calc_scale(rect->width, shift, mf_tmp.width); 339 - scale_v = soc_camera_calc_scale(rect->height, shift, mf_tmp.height); 333 + scale_h = soc_camera_calc_scale(rect->width, shift, mf_tmp->width); 334 + scale_v = soc_camera_calc_scale(rect->height, shift, mf_tmp->height); 340 335 341 - mf->width = mf_tmp.width; 342 - mf->height = mf_tmp.height; 343 - mf->colorspace = mf_tmp.colorspace; 336 + mf->width = mf_tmp->width; 337 + mf->height = mf_tmp->height; 338 + mf->colorspace = mf_tmp->colorspace; 344 339 345 340 /* 346 341 * 8. Calculate new host crop - apply camera scales to previously
+5 -3
drivers/media/platform/via-camera.c
··· 249 249 */ 250 250 static int viacam_configure_sensor(struct via_camera *cam) 251 251 { 252 - struct v4l2_mbus_framefmt mbus_fmt; 252 + struct v4l2_subdev_format format = { 253 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 254 + }; 253 255 int ret; 254 256 255 - v4l2_fill_mbus_format(&mbus_fmt, &cam->sensor_format, cam->mbus_code); 257 + v4l2_fill_mbus_format(&format.format, &cam->sensor_format, cam->mbus_code); 256 258 ret = sensor_call(cam, core, init, 0); 257 259 if (ret == 0) 258 - ret = sensor_call(cam, video, s_mbus_fmt, &mbus_fmt); 260 + ret = sensor_call(cam, pad, set_fmt, NULL, &format); 259 261 /* 260 262 * OV7670 does weird things if flip is set *before* format... 261 263 */
+7 -5
drivers/media/usb/cx231xx/cx231xx-417.c
··· 1878 1878 { 1879 1879 struct cx231xx *dev = container_of(cxhdl, struct cx231xx, mpeg_ctrl_handler); 1880 1880 int is_mpeg1 = val == V4L2_MPEG_VIDEO_ENCODING_MPEG_1; 1881 - struct v4l2_mbus_framefmt fmt; 1881 + struct v4l2_subdev_format format = { 1882 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 1883 + }; 1882 1884 1883 1885 /* fix videodecoder resolution */ 1884 - fmt.width = cxhdl->width / (is_mpeg1 ? 2 : 1); 1885 - fmt.height = cxhdl->height; 1886 - fmt.code = MEDIA_BUS_FMT_FIXED; 1887 - v4l2_subdev_call(dev->sd_cx25840, video, s_mbus_fmt, &fmt); 1886 + format.format.width = cxhdl->width / (is_mpeg1 ? 2 : 1); 1887 + format.format.height = cxhdl->height; 1888 + format.format.code = MEDIA_BUS_FMT_FIXED; 1889 + v4l2_subdev_call(dev->sd_cx25840, pad, set_fmt, NULL, &format); 1888 1890 return 0; 1889 1891 } 1890 1892
+13 -10
drivers/media/usb/cx231xx/cx231xx-video.c
··· 1013 1013 struct cx231xx *dev = fh->dev; 1014 1014 int rc; 1015 1015 struct cx231xx_fmt *fmt; 1016 - struct v4l2_mbus_framefmt mbus_fmt; 1016 + struct v4l2_subdev_format format = { 1017 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 1018 + }; 1017 1019 1018 1020 rc = check_dev(dev); 1019 1021 if (rc < 0) ··· 1043 1041 dev->height = f->fmt.pix.height; 1044 1042 dev->format = fmt; 1045 1043 1046 - v4l2_fill_mbus_format(&mbus_fmt, &f->fmt.pix, MEDIA_BUS_FMT_FIXED); 1047 - call_all(dev, video, s_mbus_fmt, &mbus_fmt); 1048 - v4l2_fill_pix_format(&f->fmt.pix, &mbus_fmt); 1044 + v4l2_fill_mbus_format(&format.format, &f->fmt.pix, MEDIA_BUS_FMT_FIXED); 1045 + call_all(dev, pad, set_fmt, NULL, &format); 1046 + v4l2_fill_pix_format(&f->fmt.pix, &format.format); 1049 1047 1050 1048 return rc; 1051 1049 } ··· 1063 1061 { 1064 1062 struct cx231xx_fh *fh = priv; 1065 1063 struct cx231xx *dev = fh->dev; 1066 - struct v4l2_mbus_framefmt mbus_fmt; 1064 + struct v4l2_subdev_format format = { 1065 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 1066 + }; 1067 1067 int rc; 1068 1068 1069 1069 rc = check_dev(dev); ··· 1089 1085 /* We need to reset basic properties in the decoder related to 1090 1086 resolution (since a standard change effects things like the number 1091 1087 of lines in VACT, etc) */ 1092 - memset(&mbus_fmt, 0, sizeof(mbus_fmt)); 1093 - mbus_fmt.code = MEDIA_BUS_FMT_FIXED; 1094 - mbus_fmt.width = dev->width; 1095 - mbus_fmt.height = dev->height; 1096 - call_all(dev, video, s_mbus_fmt, &mbus_fmt); 1088 + format.format.code = MEDIA_BUS_FMT_FIXED; 1089 + format.format.width = dev->width; 1090 + format.format.height = dev->height; 1091 + call_all(dev, pad, set_fmt, NULL, &format); 1097 1092 1098 1093 /* do mode control overrides */ 1099 1094 cx231xx_do_mode_ctrl_overrides(dev);
+7 -5
drivers/media/usb/em28xx/em28xx-camera.c
··· 404 404 .addr = client->addr, 405 405 .platform_data = &camlink, 406 406 }; 407 - struct v4l2_mbus_framefmt fmt; 407 + struct v4l2_subdev_format format = { 408 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 409 + }; 408 410 409 411 /* 410 412 * FIXME: sensor supports resolutions up to 1600x1200, but ··· 427 425 break; 428 426 } 429 427 430 - fmt.code = MEDIA_BUS_FMT_YUYV8_2X8; 431 - fmt.width = 640; 432 - fmt.height = 480; 433 - v4l2_subdev_call(subdev, video, s_mbus_fmt, &fmt); 428 + format.format.code = MEDIA_BUS_FMT_YUYV8_2X8; 429 + format.format.width = 640; 430 + format.format.height = 480; 431 + v4l2_subdev_call(subdev, pad, set_fmt, NULL, &format); 434 432 435 433 /* NOTE: for UXGA=1600x1200 switch to 12MHz */ 436 434 dev->board.xclk = EM28XX_XCLK_FREQUENCY_24MHZ;
+7 -5
drivers/media/usb/go7007/go7007-v4l2.c
··· 250 250 go->encoder_v_offset = go->board_info->sensor_v_offset; 251 251 252 252 if (go->board_info->sensor_flags & GO7007_SENSOR_SCALING) { 253 - struct v4l2_mbus_framefmt mbus_fmt; 253 + struct v4l2_subdev_format format = { 254 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 255 + }; 254 256 255 - mbus_fmt.code = MEDIA_BUS_FMT_FIXED; 256 - mbus_fmt.width = fmt ? fmt->fmt.pix.width : width; 257 - mbus_fmt.height = height; 257 + format.format.code = MEDIA_BUS_FMT_FIXED; 258 + format.format.width = fmt ? fmt->fmt.pix.width : width; 259 + format.format.height = height; 258 260 go->encoder_h_halve = 0; 259 261 go->encoder_v_halve = 0; 260 262 go->encoder_subsample = 0; 261 - call_all(&go->v4l2_dev, video, s_mbus_fmt, &mbus_fmt); 263 + call_all(&go->v4l2_dev, pad, set_fmt, NULL, &format); 262 264 } else { 263 265 if (width <= sensor_width / 4) { 264 266 go->encoder_h_halve = 1;
+10 -7
drivers/media/usb/pvrusb2/pvrusb2-hdw.c
··· 2962 2962 } 2963 2963 2964 2964 if (hdw->res_hor_dirty || hdw->res_ver_dirty || hdw->force_dirty) { 2965 - struct v4l2_mbus_framefmt fmt; 2966 - memset(&fmt, 0, sizeof(fmt)); 2967 - fmt.width = hdw->res_hor_val; 2968 - fmt.height = hdw->res_ver_val; 2969 - fmt.code = MEDIA_BUS_FMT_FIXED; 2965 + struct v4l2_subdev_format format = { 2966 + .which = V4L2_SUBDEV_FORMAT_ACTIVE, 2967 + }; 2968 + 2969 + format.format.width = hdw->res_hor_val; 2970 + format.format.height = hdw->res_ver_val; 2971 + format.format.code = MEDIA_BUS_FMT_FIXED; 2970 2972 pvr2_trace(PVR2_TRACE_CHIPS, "subdev v4l2 set_size(%dx%d)", 2971 - fmt.width, fmt.height); 2972 - v4l2_device_call_all(&hdw->v4l2_dev, 0, video, s_mbus_fmt, &fmt); 2973 + format.format.width, format.format.height); 2974 + v4l2_device_call_all(&hdw->v4l2_dev, 0, pad, set_fmt, 2975 + NULL, &format); 2973 2976 } 2974 2977 2975 2978 if (hdw->srate_dirty || hdw->force_dirty) {
-8
include/media/v4l2-subdev.h
··· 293 293 294 294 g_dv_timings(): Get custom dv timings in the sub device. 295 295 296 - try_mbus_fmt: try to set a pixel format on a video data source 297 - 298 - s_mbus_fmt: set a pixel format on a video data source 299 - 300 296 g_mbus_config: get supported mediabus configurations 301 297 302 298 s_mbus_config: set a certain mediabus configuration. This operation is added ··· 330 334 struct v4l2_dv_timings *timings); 331 335 int (*query_dv_timings)(struct v4l2_subdev *sd, 332 336 struct v4l2_dv_timings *timings); 333 - int (*try_mbus_fmt)(struct v4l2_subdev *sd, 334 - struct v4l2_mbus_framefmt *fmt); 335 - int (*s_mbus_fmt)(struct v4l2_subdev *sd, 336 - struct v4l2_mbus_framefmt *fmt); 337 337 int (*g_mbus_config)(struct v4l2_subdev *sd, 338 338 struct v4l2_mbus_config *cfg); 339 339 int (*s_mbus_config)(struct v4l2_subdev *sd,