From 9a47e9a4497a48fcd345846740f6ab94c759de59 Mon Sep 17 00:00:00 2001 From: Dikshita Agarwal Date: Thu, 3 Jun 2021 16:53:43 +0530 Subject: [PATCH] video: driver: update required fields of format struct The driver should update field variable of format structure with a value other than V4L2_FIELD_ANY. Update it with V4L2_FIELD_NONE. Fixes: v4l2-compliance: testGetFormats(VIDIOC_G_FMT). Change-Id: I2338c867b543b2964c0c6a84f76cfad6862a935f Signed-off-by: Dikshita Agarwal --- driver/vidc/src/msm_vdec.c | 2 ++ driver/vidc/src/msm_venc.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/driver/vidc/src/msm_vdec.c b/driver/vidc/src/msm_vdec.c index 78f704367f..3d091df567 100644 --- a/driver/vidc/src/msm_vdec.c +++ b/driver/vidc/src/msm_vdec.c @@ -2532,6 +2532,7 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst) f->fmt.pix_mp.plane_fmt[0].bytesperline = 0; f->fmt.pix_mp.plane_fmt[0].sizeimage = call_session_op(core, buffer_size, inst, MSM_VIDC_BUF_INPUT); + f->fmt.pix_mp.field = V4L2_FIELD_NONE; inst->buffers.input.min_count = call_session_op(core, min_count, inst, MSM_VIDC_BUF_INPUT); inst->buffers.input.extra_count = call_session_op(core, @@ -2568,6 +2569,7 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst) DEFAULT_WIDTH); f->fmt.pix_mp.plane_fmt[0].sizeimage = call_session_op(core, buffer_size, inst, MSM_VIDC_BUF_OUTPUT); + f->fmt.pix_mp.field = V4L2_FIELD_NONE; f->fmt.pix_mp.colorspace = V4L2_COLORSPACE_DEFAULT; f->fmt.pix_mp.xfer_func = V4L2_XFER_FUNC_DEFAULT; f->fmt.pix_mp.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; diff --git a/driver/vidc/src/msm_venc.c b/driver/vidc/src/msm_venc.c index 27083d9aa5..0e00050348 100644 --- a/driver/vidc/src/msm_venc.c +++ b/driver/vidc/src/msm_venc.c @@ -1753,6 +1753,7 @@ int msm_venc_inst_init(struct msm_vidc_inst *inst) f->fmt.pix_mp.plane_fmt[0].bytesperline = 0; f->fmt.pix_mp.plane_fmt[0].sizeimage = call_session_op(core, buffer_size, inst, MSM_VIDC_BUF_OUTPUT); + f->fmt.pix_mp.field = V4L2_FIELD_NONE; f->fmt.pix_mp.colorspace = V4L2_COLORSPACE_DEFAULT; f->fmt.pix_mp.xfer_func = V4L2_XFER_FUNC_DEFAULT; f->fmt.pix_mp.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT; @@ -1796,6 +1797,7 @@ int msm_venc_inst_init(struct msm_vidc_inst *inst) DEFAULT_WIDTH); f->fmt.pix_mp.plane_fmt[0].sizeimage = call_session_op(core, buffer_size, inst, MSM_VIDC_BUF_INPUT); + f->fmt.pix_mp.field = V4L2_FIELD_NONE; f->fmt.pix_mp.colorspace = V4L2_COLORSPACE_DEFAULT; f->fmt.pix_mp.xfer_func = V4L2_XFER_FUNC_DEFAULT; f->fmt.pix_mp.ycbcr_enc = V4L2_YCBCR_ENC_DEFAULT;