msm: vidc: fix input port enum_fmt

Assign enum_fmt_out to support input port enum_fmt.
Fix encoder enum_fmt compressd flag.

Change-Id: I822ee81586fe50bfe1fbfd8a808307051e639a79
Signed-off-by: Qiwei Liu <qiweil@codeaurora.org>
This commit is contained in:
Qiwei Liu 2020-05-22 20:46:01 +08:00
parent 21b711e085
commit 70c6739172
2 changed files with 2 additions and 1 deletions

View File

@ -208,6 +208,7 @@ static int msm_v4l2_querymenu(struct file *file, void *fh,
const struct v4l2_ioctl_ops msm_v4l2_ioctl_ops = {
.vidioc_querycap = msm_v4l2_querycap,
.vidioc_enum_fmt_vid_cap = msm_v4l2_enum_fmt,
.vidioc_enum_fmt_vid_out = msm_v4l2_enum_fmt,
.vidioc_s_fmt_vid_cap_mplane = msm_v4l2_s_fmt,
.vidioc_s_fmt_vid_out_mplane = msm_v4l2_s_fmt,
.vidioc_g_fmt_vid_cap_mplane = msm_v4l2_g_fmt,

View File

@ -1234,10 +1234,10 @@ int msm_venc_enum_fmt(struct msm_vidc_inst *inst, struct v4l2_fmtdesc *f)
if (f->type == OUTPUT_MPLANE) {
fmt_desc = msm_comm_get_pixel_fmt_index(venc_output_formats,
ARRAY_SIZE(venc_output_formats), f->index, inst->sid);
f->flags = V4L2_FMT_FLAG_COMPRESSED;
} else if (f->type == INPUT_MPLANE) {
fmt_desc = msm_comm_get_pixel_fmt_index(venc_input_formats,
ARRAY_SIZE(venc_input_formats), f->index, inst->sid);
f->flags = V4L2_FMT_FLAG_COMPRESSED;
}
memset(f->reserved, 0, sizeof(f->reserved));