From 7960c3b3a989340709b81116e6f410bdd5c149b0 Mon Sep 17 00:00:00 2001 From: Mihir Ganu Date: Wed, 4 Sep 2019 11:02:27 -0700 Subject: [PATCH] msm: vidc: Raise insufficient event for interlacing change Raise an insufficient event whenever there is a change reported from interlace to progressive and vice versa so that driver can set appropriate work/route mode. CRs-Fixed: 2444064 Change-Id: Ic78867a2b51aa22de5dfeeb4b806014e2f0f23e6 Signed-off-by: Mihir Ganu --- msm/vidc/msm_vidc_common.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/msm/vidc/msm_vidc_common.c b/msm/vidc/msm_vidc_common.c index cef7372396c6..d0199371bde7 100644 --- a/msm/vidc/msm_vidc_common.c +++ b/msm/vidc/msm_vidc_common.c @@ -1644,6 +1644,16 @@ static void handle_event_change(enum hal_command_response cmd, void *data) inst->colour_space == MSM_VIDC_BT2020))) event_fields_changed = true; + /* + * Check for a change from progressive to interlace + * and vice versa + */ + if ((event_notify->pic_struct == MSM_VIDC_PIC_STRUCT_MAYBE_INTERLACED && + inst->pic_struct == MSM_VIDC_PIC_STRUCT_PROGRESSIVE) || + (event_notify->pic_struct == MSM_VIDC_PIC_STRUCT_PROGRESSIVE && + inst->pic_struct == MSM_VIDC_PIC_STRUCT_MAYBE_INTERLACED)) + event_fields_changed = true; + f = &inst->fmts[OUTPUT_PORT].v4l2_fmt; event_fields_changed |= (f->fmt.pix_mp.height != event_notify->height);