msm: vidc: Initialize port format type

Initialize port format type to avoid failure
when g_fmt is called before s_fmt.

Change-Id: I37758f6d8be766c75cc8bc97147312b3b0bb0915
Signed-off-by: Mihir Ganu <mganu@codeaurora.org>
This commit is contained in:
Mihir Ganu 2019-11-18 15:18:20 -08:00
commit 36e018e3ab
2 changed files with 4 additions and 0 deletions

View file

@ -746,6 +746,7 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst)
inst->prop.extradata_ctrls = EXTRADATA_DEFAULT;
f = &inst->fmts[OUTPUT_PORT].v4l2_fmt;
f->type = OUTPUT_MPLANE;
f->fmt.pix_mp.height = DEFAULT_HEIGHT;
f->fmt.pix_mp.width = DEFAULT_WIDTH;
f->fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12_UBWC;
@ -767,6 +768,7 @@ int msm_vdec_inst_init(struct msm_vidc_inst *inst)
strlcpy(inst->fmts[OUTPUT_PORT].description, fmt_desc->description,
sizeof(inst->fmts[OUTPUT_PORT].description));
f = &inst->fmts[INPUT_PORT].v4l2_fmt;
f->type = INPUT_MPLANE;
f->fmt.pix_mp.height = DEFAULT_HEIGHT;
f->fmt.pix_mp.width = DEFAULT_WIDTH;
f->fmt.pix_mp.pixelformat = V4L2_PIX_FMT_H264;

View file

@ -1108,6 +1108,7 @@ int msm_venc_inst_init(struct msm_vidc_inst *inst)
return -EINVAL;
}
f = &inst->fmts[OUTPUT_PORT].v4l2_fmt;
f->type = OUTPUT_MPLANE;
f->fmt.pix_mp.height = DEFAULT_HEIGHT;
f->fmt.pix_mp.width = DEFAULT_WIDTH;
f->fmt.pix_mp.pixelformat = V4L2_PIX_FMT_H264;
@ -1127,6 +1128,7 @@ int msm_venc_inst_init(struct msm_vidc_inst *inst)
strlcpy(inst->fmts[OUTPUT_PORT].description, fmt_desc->description,
sizeof(inst->fmts[OUTPUT_PORT].description));
f = &inst->fmts[INPUT_PORT].v4l2_fmt;
f->type = INPUT_MPLANE;
f->fmt.pix_mp.height = DEFAULT_HEIGHT;
f->fmt.pix_mp.width = DEFAULT_WIDTH;
f->fmt.pix_mp.pixelformat = V4L2_PIX_FMT_NV12_UBWC;