Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752160AbeAIIwJ (ORCPT + 1 other); Tue, 9 Jan 2018 03:52:09 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:33717 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751728AbeAIIwG (ORCPT ); Tue, 9 Jan 2018 03:52:06 -0500 X-Google-Smtp-Source: ACJfBouaul5fJe6hzAIzpJohR7VLh3k6tRSnUOVdTMxsqV8QaTYMD6gD8P+2914B4/qL96ig/zjRAiPOrRbojRR0vlA= MIME-Version: 1.0 In-Reply-To: <20180109084247.104601-1-tfiga@chromium.org> References: <20180109084247.104601-1-tfiga@chromium.org> From: =?UTF-8?B?V3UtQ2hlbmcgTGkgKOadjuWLmeiqoCk=?= Date: Tue, 9 Jan 2018 16:51:45 +0800 X-Google-Sender-Auth: vcke3vjQs0o5altEf0ASmYP2Oeo Message-ID: Subject: Re: [PATCH] media: mtk-vcodec: Always signal source change event on format change To: Tomasz Figa Cc: linux-media@vger.kernel.org, Tiffany Lin , Andrew-CT Chen , Mauro Carvalho Chehab , Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, =?UTF-8?B?UGF3ZcWCIE/Fm2NpYWs=?= , Wu-Cheng Li Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Reviewed-by: Wu-Cheng Li On Tue, Jan 9, 2018 at 4:42 PM, Tomasz Figa wrote: > Currently the driver signals the source change event only in case of > a midstream resolution change, however the initial format detection > is also defined as a source change by the V4L2 codec API specification. > Fix this by signaling the event after the initial header is parsed as > well. > > Signed-off-by: Tomasz Figa > --- > drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > index 843510979ad8..86f0a7134365 100644 > --- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > +++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c > @@ -1224,6 +1224,8 @@ static void vb2ops_vdec_buf_queue(struct vb2_buffer *vb) > ctx->dpb_size = dpbsize; > ctx->state = MTK_STATE_HEADER; > mtk_v4l2_debug(1, "[%d] dpbsize=%d", ctx->id, ctx->dpb_size); > + > + mtk_vdec_queue_res_chg_event(ctx); > } > > static void vb2ops_vdec_buf_finish(struct vb2_buffer *vb) > -- > 2.16.0.rc0.223.g4a4ac83678-goog >