Skip to contentSkip to conversation

v4l2-ioctl: set V4L2_CAP_EXT_PIX_FORMAT for device_caps

PATCH In review Hans Verkuil 2 participants 2 messages Jul 21, 2014 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 v4l2-ioctl: set V4L2_CAP_EXT_PIX_FORMAT for device_caps

V4L2_CAP_EXT_PIX_FORMAT is set for capabilities, but it needs to be set for device_caps as well: device_caps should report all caps relevant to the device node, and this is one of them.

drivers/media/v4l2-core/v4l2-ioctl.c +1 -0
index e620387..00ceedf 100644
@@ -1014,6 +1014,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops,
 	ret = ops->vidioc_querycap(file, fh, cap);
 
 	cap->capabilities |= V4L2_CAP_EXT_PIX_FORMAT;
+	cap->device_caps |= V4L2_CAP_EXT_PIX_FORMAT;
 
 	return ret;
 }
Acked-by on v1 1/1
#1 lore raw

Hi Hans,

Thank you for the patch.

Quoted 5 lines · On Monday 21 July 2014 09:14:46 Hans Verkuil wrote:

V4L2_CAP_EXT_PIX_FORMAT is set for capabilities, but it needs to be set for device_caps as well: device_caps should report all caps relevant to the device node, and this is one of them.

Quoted 12 lines
(quoted diff) +0 -0

b/drivers/media/v4l2-core/v4l2-ioctl.c index e620387..00ceedf 100644

drivers/media/v4l2-core/v4l2-ioctl.c +1 -0
@@ -1014,6 +1014,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops
 *ops, ret = ops->vidioc_querycap(file, fh, cap);
 
 	cap->capabilities |= V4L2_CAP_EXT_PIX_FORMAT;
+	cap->device_caps |= V4L2_CAP_EXT_PIX_FORMAT;
 
 	return ret;
 }
Signature · 3 lines
Regards,

Laurent Pinchart