Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752031AbeAIInC (ORCPT + 1 other); Tue, 9 Jan 2018 03:43:02 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:44320 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751669AbeAIInB (ORCPT ); Tue, 9 Jan 2018 03:43:01 -0500 X-Google-Smtp-Source: ACJfBovqwFOZW9fUmJJkdzMDzd7g4s9vGGpv9423hG2c4DPzGKskpW67s7wOo24IYHu3eTTRKBYq6Q== From: Tomasz Figa To: linux-media@vger.kernel.org Cc: 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?q?Pawe=C5=82=20O=C5=9Bciak?= , "Wu-Cheng Li" , Tomasz Figa Subject: [PATCH] media: mtk-vcodec: Always signal source change event on format change Date: Tue, 9 Jan 2018 17:42:47 +0900 Message-Id: <20180109084247.104601-1-tfiga@chromium.org> X-Mailer: git-send-email 2.16.0.rc0.223.g4a4ac83678-goog Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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