From: Hans Verkuil Date: Fri, 12 Mar 2021 08:49:55 +0000 (+0100) Subject: media: v4l2-ctrls.c: initialize flags field of p_fwht_params X-Git-Tag: v5.11.20~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6b467bc7d8ba3e0e065a223666a5881a4ccf7f5;p=thirdparty%2Fkernel%2Fstable.git media: v4l2-ctrls.c: initialize flags field of p_fwht_params [ Upstream commit ea1611ba3a544b34f89ffa3d1e833caab30a3f09 ] The V4L2_CID_STATELESS_FWHT_PARAMS compound control was missing a proper initialization of the flags field, so after loading the vicodec module for the first time, running v4l2-compliance for the stateless decoder would fail on this control because the initial control value was considered invalid by the vicodec driver. Initializing the flags field to sane values fixes this. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index 9dc151431a5c6..584c5b33690e1 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -1659,6 +1659,8 @@ static void std_init_compound(const struct v4l2_ctrl *ctrl, u32 idx, p_fwht_params->version = V4L2_FWHT_VERSION; p_fwht_params->width = 1280; p_fwht_params->height = 720; + p_fwht_params->flags = V4L2_FWHT_FL_PIXENC_YUV | + (2 << V4L2_FWHT_FL_COMPONENTS_NUM_OFFSET); break; } }