提交 7208507e 编写于 作者: S Sylwester Nawrocki 提交者: Mauro Carvalho Chehab

[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: NSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 81c9bcfb
...@@ -164,9 +164,8 @@ static int mxr_querycap(struct file *file, void *priv, ...@@ -164,9 +164,8 @@ static int mxr_querycap(struct file *file, void *priv,
strlcpy(cap->driver, MXR_DRIVER_NAME, sizeof cap->driver); strlcpy(cap->driver, MXR_DRIVER_NAME, sizeof cap->driver);
strlcpy(cap->card, layer->vfd.name, sizeof cap->card); strlcpy(cap->card, layer->vfd.name, sizeof cap->card);
sprintf(cap->bus_info, "%d", layer->idx); sprintf(cap->bus_info, "%d", layer->idx);
cap->version = KERNEL_VERSION(0, 1, 0); cap->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_OUTPUT_MPLANE;
cap->capabilities = V4L2_CAP_STREAMING | cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS;
V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_VIDEO_OUTPUT_MPLANE;
return 0; return 0;
} }
...@@ -718,7 +717,7 @@ static int mxr_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) ...@@ -718,7 +717,7 @@ static int mxr_streamoff(struct file *file, void *priv, enum v4l2_buf_type i)
static const struct v4l2_ioctl_ops mxr_ioctl_ops = { static const struct v4l2_ioctl_ops mxr_ioctl_ops = {
.vidioc_querycap = mxr_querycap, .vidioc_querycap = mxr_querycap,
/* format handling */ /* format handling */
.vidioc_enum_fmt_vid_out = mxr_enum_fmt, .vidioc_enum_fmt_vid_out_mplane = mxr_enum_fmt,
.vidioc_s_fmt_vid_out_mplane = mxr_s_fmt, .vidioc_s_fmt_vid_out_mplane = mxr_s_fmt,
.vidioc_g_fmt_vid_out_mplane = mxr_g_fmt, .vidioc_g_fmt_vid_out_mplane = mxr_g_fmt,
/* buffer control */ /* buffer control */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册