aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2012-09-05 05:05:50 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-26 10:57:06 -0400
commit954f340fc7f2fa2ae8812670da49e828d2686d8e (patch)
treeb6faff35d6f9a58fb2edde91b3888c7794b1b942 /drivers
parent5c77879ff9ab9e7dd5b4a78666a09af1a8854be9 (diff)
[media] Set vfl_dir for all display or m2m drivers
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/pci/ivtv/ivtv-streams.c3
-rw-r--r--drivers/media/pci/zoran/zoran_card.c4
-rw-r--r--drivers/media/platform/coda.c1
-rw-r--r--drivers/media/platform/davinci/vpbe_display.c1
-rw-r--r--drivers/media/platform/davinci/vpif_display.c1
-rw-r--r--drivers/media/platform/m2m-deinterlace.c1
-rw-r--r--drivers/media/platform/mem2mem_testdev.c1
-rw-r--r--drivers/media/platform/mx2_emmaprp.c1
-rw-r--r--drivers/media/platform/omap/omap_vout.c1
-rw-r--r--drivers/media/platform/omap3isp/ispvideo.c1
-rw-r--r--drivers/media/platform/s5p-fimc/fimc-m2m.c1
-rw-r--r--drivers/media/platform/s5p-g2d/g2d.c1
-rw-r--r--drivers/media/platform/s5p-jpeg/jpeg-core.c1
-rw-r--r--drivers/media/platform/s5p-mfc/s5p_mfc.c1
-rw-r--r--drivers/media/platform/s5p-tv/mixer_video.c1
-rw-r--r--drivers/media/platform/sh_vou.c1
-rw-r--r--drivers/media/usb/uvc/uvc_driver.c2
17 files changed, 23 insertions, 0 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-streams.c b/drivers/media/pci/ivtv/ivtv-streams.c
index 0ff264e0e0f6..7b8648a827f5 100644
--- a/drivers/media/pci/ivtv/ivtv-streams.c
+++ b/drivers/media/pci/ivtv/ivtv-streams.c
@@ -222,6 +222,9 @@ static int ivtv_prep_dev(struct ivtv *itv, int type)
222 222
223 s->vdev->num = num; 223 s->vdev->num = num;
224 s->vdev->v4l2_dev = &itv->v4l2_dev; 224 s->vdev->v4l2_dev = &itv->v4l2_dev;
225 if (ivtv_stream_info[type].v4l2_caps &
226 (V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_SLICED_VBI_OUTPUT))
227 s->vdev->vfl_dir = VFL_DIR_TX;
225 s->vdev->fops = ivtv_stream_info[type].fops; 228 s->vdev->fops = ivtv_stream_info[type].fops;
226 s->vdev->ctrl_handler = itv->v4l2_dev.ctrl_handler; 229 s->vdev->ctrl_handler = itv->v4l2_dev.ctrl_handler;
227 s->vdev->release = video_device_release; 230 s->vdev->release = video_device_release;
diff --git a/drivers/media/pci/zoran/zoran_card.c b/drivers/media/pci/zoran/zoran_card.c
index c3602d6cd48e..fffc54b452c8 100644
--- a/drivers/media/pci/zoran/zoran_card.c
+++ b/drivers/media/pci/zoran/zoran_card.c
@@ -1055,6 +1055,10 @@ zr36057_init (struct zoran *zr)
1055 memcpy(zr->video_dev, &zoran_template, sizeof(zoran_template)); 1055 memcpy(zr->video_dev, &zoran_template, sizeof(zoran_template));
1056 zr->video_dev->parent = &zr->pci_dev->dev; 1056 zr->video_dev->parent = &zr->pci_dev->dev;
1057 strcpy(zr->video_dev->name, ZR_DEVNAME(zr)); 1057 strcpy(zr->video_dev->name, ZR_DEVNAME(zr));
1058 /* It's not a mem2mem device, but you can both capture and output from
1059 one and the same device. This should really be split up into two
1060 device nodes, but that's a job for another day. */
1061 zr->video_dev->vfl_dir = VFL_DIR_M2M;
1058 err = video_register_device(zr->video_dev, VFL_TYPE_GRABBER, video_nr[zr->id]); 1062 err = video_register_device(zr->video_dev, VFL_TYPE_GRABBER, video_nr[zr->id]);
1059 if (err < 0) 1063 if (err < 0)
1060 goto exit_free; 1064 goto exit_free;
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index 0d4b5c0b37ee..10eaf1189d89 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -1639,6 +1639,7 @@ static void coda_fw_callback(const struct firmware *fw, void *context)
1639 dev->vfd.release = video_device_release_empty, 1639 dev->vfd.release = video_device_release_empty,
1640 dev->vfd.lock = &dev->dev_mutex; 1640 dev->vfd.lock = &dev->dev_mutex;
1641 dev->vfd.v4l2_dev = &dev->v4l2_dev; 1641 dev->vfd.v4l2_dev = &dev->v4l2_dev;
1642 dev->vfd.vfl_dir = VFL_DIR_M2M;
1642 snprintf(dev->vfd.name, sizeof(dev->vfd.name), "%s", CODA_NAME); 1643 snprintf(dev->vfd.name, sizeof(dev->vfd.name), "%s", CODA_NAME);
1643 video_set_drvdata(&dev->vfd, dev); 1644 video_set_drvdata(&dev->vfd, dev);
1644 1645
diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c
index e712d6734ac8..239f37bfa313 100644
--- a/drivers/media/platform/davinci/vpbe_display.c
+++ b/drivers/media/platform/davinci/vpbe_display.c
@@ -1633,6 +1633,7 @@ static __devinit int init_vpbe_layer(int i, struct vpbe_display *disp_dev,
1633 vbd->minor = -1; 1633 vbd->minor = -1;
1634 vbd->v4l2_dev = &disp_dev->vpbe_dev->v4l2_dev; 1634 vbd->v4l2_dev = &disp_dev->vpbe_dev->v4l2_dev;
1635 vbd->lock = &vpbe_display_layer->opslock; 1635 vbd->lock = &vpbe_display_layer->opslock;
1636 vbd->vfl_dir = VFL_DIR_TX;
1636 1637
1637 if (disp_dev->vpbe_dev->current_timings.timings_type & 1638 if (disp_dev->vpbe_dev->current_timings.timings_type &
1638 VPBE_ENC_STD) { 1639 VPBE_ENC_STD) {
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c
index 4a24848c1a66..ff6e43293ce4 100644
--- a/drivers/media/platform/davinci/vpif_display.c
+++ b/drivers/media/platform/davinci/vpif_display.c
@@ -1745,6 +1745,7 @@ static __init int vpif_probe(struct platform_device *pdev)
1745 *vfd = vpif_video_template; 1745 *vfd = vpif_video_template;
1746 vfd->v4l2_dev = &vpif_obj.v4l2_dev; 1746 vfd->v4l2_dev = &vpif_obj.v4l2_dev;
1747 vfd->release = video_device_release; 1747 vfd->release = video_device_release;
1748 vfd->vfl_dir = VFL_DIR_TX;
1748 snprintf(vfd->name, sizeof(vfd->name), 1749 snprintf(vfd->name, sizeof(vfd->name),
1749 "VPIF_Display_DRIVER_V%s", 1750 "VPIF_Display_DRIVER_V%s",
1750 VPIF_DISPLAY_VERSION); 1751 VPIF_DISPLAY_VERSION);
diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c
index 9afd93075b61..c4ad9fca5dbf 100644
--- a/drivers/media/platform/m2m-deinterlace.c
+++ b/drivers/media/platform/m2m-deinterlace.c
@@ -980,6 +980,7 @@ static struct video_device deinterlace_videodev = {
980 .ioctl_ops = &deinterlace_ioctl_ops, 980 .ioctl_ops = &deinterlace_ioctl_ops,
981 .minor = -1, 981 .minor = -1,
982 .release = video_device_release, 982 .release = video_device_release,
983 .vfl_dir = VFL_DIR_M2M,
983}; 984};
984 985
985static struct v4l2_m2m_ops m2m_ops = { 986static struct v4l2_m2m_ops m2m_ops = {
diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/media/platform/mem2mem_testdev.c
index c1229bef153c..d03637537118 100644
--- a/drivers/media/platform/mem2mem_testdev.c
+++ b/drivers/media/platform/mem2mem_testdev.c
@@ -999,6 +999,7 @@ static const struct v4l2_file_operations m2mtest_fops = {
999 999
1000static struct video_device m2mtest_videodev = { 1000static struct video_device m2mtest_videodev = {
1001 .name = MEM2MEM_NAME, 1001 .name = MEM2MEM_NAME,
1002 .vfl_dir = VFL_DIR_M2M,
1002 .fops = &m2mtest_fops, 1003 .fops = &m2mtest_fops,
1003 .ioctl_ops = &m2mtest_ioctl_ops, 1004 .ioctl_ops = &m2mtest_ioctl_ops,
1004 .minor = -1, 1005 .minor = -1,
diff --git a/drivers/media/platform/mx2_emmaprp.c b/drivers/media/platform/mx2_emmaprp.c
index 2236315778c3..8f22ce543cf7 100644
--- a/drivers/media/platform/mx2_emmaprp.c
+++ b/drivers/media/platform/mx2_emmaprp.c
@@ -877,6 +877,7 @@ static struct video_device emmaprp_videodev = {
877 .ioctl_ops = &emmaprp_ioctl_ops, 877 .ioctl_ops = &emmaprp_ioctl_ops,
878 .minor = -1, 878 .minor = -1,
879 .release = video_device_release, 879 .release = video_device_release,
880 .vfl_dir = VFL_DIR_M2M,
880}; 881};
881 882
882static struct v4l2_m2m_ops m2m_ops = { 883static struct v4l2_m2m_ops m2m_ops = {
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
index 36c3be85649d..196e51670050 100644
--- a/drivers/media/platform/omap/omap_vout.c
+++ b/drivers/media/platform/omap/omap_vout.c
@@ -1951,6 +1951,7 @@ static int __init omap_vout_setup_video_data(struct omap_vout_device *vout)
1951 1951
1952 vfd->fops = &omap_vout_fops; 1952 vfd->fops = &omap_vout_fops;
1953 vfd->v4l2_dev = &vout->vid_dev->v4l2_dev; 1953 vfd->v4l2_dev = &vout->vid_dev->v4l2_dev;
1954 vfd->vfl_dir = VFL_DIR_TX;
1954 mutex_init(&vout->lock); 1955 mutex_init(&vout->lock);
1955 1956
1956 vfd->minor = -1; 1957 vfd->minor = -1;
diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c
index 3a5085e90024..c78f60a0220d 100644
--- a/drivers/media/platform/omap3isp/ispvideo.c
+++ b/drivers/media/platform/omap3isp/ispvideo.c
@@ -1342,6 +1342,7 @@ int omap3isp_video_init(struct isp_video *video, const char *name)
1342 case V4L2_BUF_TYPE_VIDEO_OUTPUT: 1342 case V4L2_BUF_TYPE_VIDEO_OUTPUT:
1343 direction = "input"; 1343 direction = "input";
1344 video->pad.flags = MEDIA_PAD_FL_SOURCE; 1344 video->pad.flags = MEDIA_PAD_FL_SOURCE;
1345 video->video.vfl_dir = VFL_DIR_TX;
1345 break; 1346 break;
1346 1347
1347 default: 1348 default:
diff --git a/drivers/media/platform/s5p-fimc/fimc-m2m.c b/drivers/media/platform/s5p-fimc/fimc-m2m.c
index c67e53bfa43a..9237e53cf6df 100644
--- a/drivers/media/platform/s5p-fimc/fimc-m2m.c
+++ b/drivers/media/platform/s5p-fimc/fimc-m2m.c
@@ -804,6 +804,7 @@ int fimc_register_m2m_device(struct fimc_dev *fimc,
804 vfd->minor = -1; 804 vfd->minor = -1;
805 vfd->release = video_device_release; 805 vfd->release = video_device_release;
806 vfd->lock = &fimc->lock; 806 vfd->lock = &fimc->lock;
807 vfd->vfl_dir = VFL_DIR_M2M;
807 808
808 snprintf(vfd->name, sizeof(vfd->name), "fimc.%d.m2m", fimc->id); 809 snprintf(vfd->name, sizeof(vfd->name), "fimc.%d.m2m", fimc->id);
809 video_set_drvdata(vfd, fimc); 810 video_set_drvdata(vfd, fimc);
diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c
index 69c9f22ee52a..1e3b9dd014c0 100644
--- a/drivers/media/platform/s5p-g2d/g2d.c
+++ b/drivers/media/platform/s5p-g2d/g2d.c
@@ -680,6 +680,7 @@ static struct video_device g2d_videodev = {
680 .ioctl_ops = &g2d_ioctl_ops, 680 .ioctl_ops = &g2d_ioctl_ops,
681 .minor = -1, 681 .minor = -1,
682 .release = video_device_release, 682 .release = video_device_release,
683 .vfl_dir = VFL_DIR_M2M,
683}; 684};
684 685
685static struct v4l2_m2m_ops g2d_m2m_ops = { 686static struct v4l2_m2m_ops g2d_m2m_ops = {
diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index 90459cefb2b8..bf2d94bb0f6e 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -1392,6 +1392,7 @@ static int s5p_jpeg_probe(struct platform_device *pdev)
1392 jpeg->vfd_encoder->release = video_device_release; 1392 jpeg->vfd_encoder->release = video_device_release;
1393 jpeg->vfd_encoder->lock = &jpeg->lock; 1393 jpeg->vfd_encoder->lock = &jpeg->lock;
1394 jpeg->vfd_encoder->v4l2_dev = &jpeg->v4l2_dev; 1394 jpeg->vfd_encoder->v4l2_dev = &jpeg->v4l2_dev;
1395 jpeg->vfd_encoder->vfl_dir = VFL_DIR_M2M;
1395 1396
1396 ret = video_register_device(jpeg->vfd_encoder, VFL_TYPE_GRABBER, -1); 1397 ret = video_register_device(jpeg->vfd_encoder, VFL_TYPE_GRABBER, -1);
1397 if (ret) { 1398 if (ret) {
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index e3e616d8a09d..0476be4ee567 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1048,6 +1048,7 @@ static int s5p_mfc_probe(struct platform_device *pdev)
1048 vfd->release = video_device_release, 1048 vfd->release = video_device_release,
1049 vfd->lock = &dev->mfc_mutex; 1049 vfd->lock = &dev->mfc_mutex;
1050 vfd->v4l2_dev = &dev->v4l2_dev; 1050 vfd->v4l2_dev = &dev->v4l2_dev;
1051 vfd->vfl_dir = VFL_DIR_M2M;
1051 snprintf(vfd->name, sizeof(vfd->name), "%s", S5P_MFC_DEC_NAME); 1052 snprintf(vfd->name, sizeof(vfd->name), "%s", S5P_MFC_DEC_NAME);
1052 dev->vfd_dec = vfd; 1053 dev->vfd_dec = vfd;
1053 ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0); 1054 ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c
index a9c6be39246d..bd42ea301650 100644
--- a/drivers/media/platform/s5p-tv/mixer_video.c
+++ b/drivers/media/platform/s5p-tv/mixer_video.c
@@ -1081,6 +1081,7 @@ struct mxr_layer *mxr_base_layer_create(struct mxr_device *mdev,
1081 .minor = -1, 1081 .minor = -1,
1082 .release = mxr_vfd_release, 1082 .release = mxr_vfd_release,
1083 .fops = &mxr_fops, 1083 .fops = &mxr_fops,
1084 .vfl_dir = VFL_DIR_TX,
1084 .ioctl_ops = &mxr_ioctl_ops, 1085 .ioctl_ops = &mxr_ioctl_ops,
1085 }; 1086 };
1086 strlcpy(layer->vfd.name, name, sizeof(layer->vfd.name)); 1087 strlcpy(layer->vfd.name, name, sizeof(layer->vfd.name));
diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c
index 00cd52c61fe0..ba3de3e02d47 100644
--- a/drivers/media/platform/sh_vou.c
+++ b/drivers/media/platform/sh_vou.c
@@ -1320,6 +1320,7 @@ static const struct video_device sh_vou_video_template = {
1320 .ioctl_ops = &sh_vou_ioctl_ops, 1320 .ioctl_ops = &sh_vou_ioctl_ops,
1321 .tvnorms = V4L2_STD_525_60, /* PAL only supported in 8-bit non-bt656 mode */ 1321 .tvnorms = V4L2_STD_525_60, /* PAL only supported in 8-bit non-bt656 mode */
1322 .current_norm = V4L2_STD_NTSC_M, 1322 .current_norm = V4L2_STD_NTSC_M,
1323 .vfl_dir = VFL_DIR_TX,
1323}; 1324};
1324 1325
1325static int __devinit sh_vou_probe(struct platform_device *pdev) 1326static int __devinit sh_vou_probe(struct platform_device *pdev)
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 287f73182a69..5967081747ce 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -1722,6 +1722,8 @@ static int uvc_register_video(struct uvc_device *dev,
1722 vdev->v4l2_dev = &dev->vdev; 1722 vdev->v4l2_dev = &dev->vdev;
1723 vdev->fops = &uvc_fops; 1723 vdev->fops = &uvc_fops;
1724 vdev->release = uvc_release; 1724 vdev->release = uvc_release;
1725 if (stream->type == V4L2_BUF_TYPE_VIDEO_OUTPUT)
1726 vdev->vfl_dir = VFL_DIR_TX;
1725 strlcpy(vdev->name, dev->name, sizeof vdev->name); 1727 strlcpy(vdev->name, dev->name, sizeof vdev->name);
1726 1728
1727 /* Set the driver data before calling video_register_device, otherwise 1729 /* Set the driver data before calling video_register_device, otherwise