aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2012-09-24 05:03:04 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-02 13:04:19 -0400
commit7208507ed9dc39a7ac3bd2c64440c461762d8174 (patch)
treeeee435bdfcca9b3cd3afb1e1de326dfee205f051 /drivers/media/platform
parent81c9bcfbefec212548058eeac612d98dc9290d55 (diff)
[media] s5p-tv: Report only multi-plane capabilities in vidioc_querycap
The mixer video node supports only multi-planar API so the driver should not be setting V4L2_CAP_VIDEO_OUTPUT flags. Fix this and also switch to device_caps. Additionally fix the VIDIOC_ENUM_FMT ioctl handler which now works for V4L2_BUF_TYPE_CAPTURE, rather than expected V4L2_BUF_TYPE_CAPTURE_MPLANE. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/s5p-tv/mixer_video.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/platform/s5p-tv/mixer_video.c b/drivers/media/platform/s5p-tv/mixer_video.c
index bd42ea301650..0c1cd895ff66 100644
--- a/drivers/media/platform/s5p-tv/mixer_video.c
+++ b/drivers/media/platform/s5p-tv/mixer_video.c
@@ -164,9 +164,8 @@ static int mxr_querycap(struct file *file, void *priv,
164 strlcpy(cap->driver, MXR_DRIVER_NAME, sizeof cap->driver); 164 strlcpy(cap->driver, MXR_DRIVER_NAME, sizeof cap->driver);
165 strlcpy(cap->card, layer->vfd.name, sizeof cap->card); 165 strlcpy(cap->card, layer->vfd.name, sizeof cap->card);
166 sprintf(cap->bus_info, "%d", layer->idx); 166 sprintf(cap->bus_info, "%d", layer->idx);
167 cap->version = KERNEL_VERSION(0, 1, 0); 167 cap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT_MPLANE;
168 cap->capabilities = V4L2_CAP_STREAMING | 168 cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
169 V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_VIDEO_OUTPUT_MPLANE;
170 169
171 return 0; 170 return 0;
172} 171}
@@ -718,7 +717,7 @@ static int mxr_streamoff(struct file *file, void *priv, enum v4l2_buf_type i)
718static const struct v4l2_ioctl_ops mxr_ioctl_ops = { 717static const struct v4l2_ioctl_ops mxr_ioctl_ops = {
719 .vidioc_querycap = mxr_querycap, 718 .vidioc_querycap = mxr_querycap,
720 /* format handling */ 719 /* format handling */
721 .vidioc_enum_fmt_vid_out = mxr_enum_fmt, 720 .vidioc_enum_fmt_vid_out_mplane = mxr_enum_fmt,
722 .vidioc_s_fmt_vid_out_mplane = mxr_s_fmt, 721 .vidioc_s_fmt_vid_out_mplane = mxr_s_fmt,
723 .vidioc_g_fmt_vid_out_mplane = mxr_g_fmt, 722 .vidioc_g_fmt_vid_out_mplane = mxr_g_fmt,
724 /* buffer control */ 723 /* buffer control */