diff mbox series

[PATCHv2,6/6] v4l2-ctrls: mark MPEG2 stateless controls as REQUIRES_REQUESTS

Message ID 20190211101357.48754-7-hverkuil-cisco@xs4all.nl (mailing list archive)
State New, archived
Headers show
Series vb2/v4l2-ctrls: check if requests are required | expand

Commit Message

Hans Verkuil Feb. 11, 2019, 10:13 a.m. UTC
These stateless codec controls can only be used in combination with
a request. So mark them as such.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/v4l2-core/v4l2-ctrls.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 25f80f0eba69..7825c8d66498 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -1299,9 +1299,11 @@  void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
 		break;
 	case V4L2_CID_MPEG_VIDEO_MPEG2_SLICE_PARAMS:
 		*type = V4L2_CTRL_TYPE_MPEG2_SLICE_PARAMS;
+		*flags |= V4L2_CTRL_FLAG_REQUIRES_REQUESTS;
 		break;
 	case V4L2_CID_MPEG_VIDEO_MPEG2_QUANTIZATION:
 		*type = V4L2_CTRL_TYPE_MPEG2_QUANTIZATION;
+		*flags |= V4L2_CTRL_FLAG_REQUIRES_REQUESTS;
 		break;
 	default:
 		*type = V4L2_CTRL_TYPE_INTEGER;