Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: amphion: G/S_PARM only for encoder's output queue

G/S_PARM doesn't make sense for the capture queue of a stateful encoder,
unless V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL is set to reserve hardware
resources.

Otherwise it will fail the v4l2-compliance

Signed-off-by: Ming Qian <ming.qian@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Ming Qian and committed by
Mauro Carvalho Chehab
d67005b7 81cad440

+6
+6
drivers/media/platform/amphion/venc.c
··· 283 283 if (!parm) 284 284 return -EINVAL; 285 285 286 + if (!V4L2_TYPE_IS_OUTPUT(parm->type)) 287 + return -EINVAL; 288 + 286 289 if (!vpu_helper_check_type(inst, parm->type)) 287 290 return -EINVAL; 288 291 ··· 305 302 unsigned long n, d; 306 303 307 304 if (!parm) 305 + return -EINVAL; 306 + 307 + if (!V4L2_TYPE_IS_OUTPUT(parm->type)) 308 308 return -EINVAL; 309 309 310 310 if (!vpu_helper_check_type(inst, parm->type))