Commit 6d2eaece authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Mauro Carvalho Chehab

media: xilinx: regroup caps on querycap

To better organize the code we concentrate the setting of
V4L2_CAP_STREAMING in one place.
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.com>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 13721280
...@@ -494,13 +494,15 @@ xvip_dma_querycap(struct file *file, void *fh, struct v4l2_capability *cap) ...@@ -494,13 +494,15 @@ xvip_dma_querycap(struct file *file, void *fh, struct v4l2_capability *cap)
struct v4l2_fh *vfh = file->private_data; struct v4l2_fh *vfh = file->private_data;
struct xvip_dma *dma = to_xvip_dma(vfh->vdev); struct xvip_dma *dma = to_xvip_dma(vfh->vdev);
cap->capabilities = V4L2_CAP_DEVICE_CAPS | V4L2_CAP_STREAMING cap->device_caps = V4L2_CAP_STREAMING;
| dma->xdev->v4l2_caps;
if (dma->queue.type == V4L2_BUF_TYPE_VIDEO_CAPTURE) if (dma->queue.type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; cap->device_caps |= V4L2_CAP_VIDEO_CAPTURE;
else else
cap->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; cap->device_caps |= V4L2_CAP_VIDEO_OUTPUT;
cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS
| dma->xdev->v4l2_caps;
strlcpy(cap->driver, "xilinx-vipp", sizeof(cap->driver)); strlcpy(cap->driver, "xilinx-vipp", sizeof(cap->driver));
strlcpy(cap->card, dma->video.name, sizeof(cap->card)); strlcpy(cap->card, dma->video.name, sizeof(cap->card));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment