From ffb2a5cb24f9e0d1994496131bcbe513759d3ed9 Mon Sep 17 00:00:00 2001 From: Brian Zhu Date: Thu, 19 Mar 2020 12:24:24 +0800 Subject: [PATCH] deinterlace: fix display abnormal with progressive video [1/1] PD#SWPL-22415 Problem: Config DI mif wrong when processing progressive frame Solution: Using right vf->type as condition. Verify: Verified on u212 Change-Id: I1f24385967bc00039702d2d873b37b6e12241b13 Signed-off-by: Brian Zhu --- drivers/amlogic/media/deinterlace/deinterlace.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/amlogic/media/deinterlace/deinterlace.c b/drivers/amlogic/media/deinterlace/deinterlace.c index 66b4d6eb72bd..57a088addd1c 100644 --- a/drivers/amlogic/media/deinterlace/deinterlace.c +++ b/drivers/amlogic/media/deinterlace/deinterlace.c @@ -3323,7 +3323,6 @@ static void config_di_mif(struct DI_MIF_s *di_mif, struct di_buf_s *di_buf) else di_mif->set_separate_en = 1; - if (is_progressive(di_buf->vframe) && (di_pre_stru.prog_proc_type)) { di_mif->src_field_mode = 0; @@ -3340,12 +3339,9 @@ static void config_di_mif(struct DI_MIF_s *di_mif, struct di_buf_s *di_buf) di_mif->chroma_y_start0 = 0; di_mif->chroma_y_end0 = (di_buf->vframe->height + 1) / 2 - 1; - } else if ((di_buf->vframe->type & VIDTYPE_INTERLACE) && - (di_buf->vframe->type & VIDTYPE_VIU_FIELD)) { - if (di_pre_stru.cur_inp_type & VIDTYPE_INTERLACE) - di_mif->src_prog = 0; - else - di_mif->src_prog = force_prog ? 1 : 0; + } else if ((di_pre_stru.cur_inp_type & VIDTYPE_INTERLACE) && + (di_pre_stru.cur_inp_type & VIDTYPE_VIU_FIELD)) { + di_mif->src_prog = 0; di_mif->src_field_mode = 0; di_mif->output_field_num = 0; /* top */ di_mif->luma_x_start0 = 0;