From patchwork Tue Jan 9 08:42:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 10151183 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E0F7460223 for ; Tue, 9 Jan 2018 08:43:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D340B285FC for ; Tue, 9 Jan 2018 08:43:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7C892863B; Tue, 9 Jan 2018 08:43:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6973F285FC for ; Tue, 9 Jan 2018 08:43:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751956AbeAIInC (ORCPT ); Tue, 9 Jan 2018 03:43:02 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:46120 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751766AbeAIInB (ORCPT ); Tue, 9 Jan 2018 03:43:01 -0500 Received: by mail-pg0-f67.google.com with SMTP id r2so7537379pgq.13 for ; Tue, 09 Jan 2018 00:43:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=GiaXIWV5ZU/exIdXSAheyMdnqmSNeWOHtV2z7ZirEI8=; b=JYSzuwLArRvGmVKq40ukUgSNr4/wXfK66sFq7hSe4xy4+Oj/xWdnF2CSMAYedwjyB7 9ofaNYo0UyGbp9Jvd3mzlBax0Q18/8Ru3VbVfcSa853vLpIPK0gs8KGcWKXM3xJUy37k luzbo37f0NobVkXxSlVZTcJ3eG3poMFpFrKHw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GiaXIWV5ZU/exIdXSAheyMdnqmSNeWOHtV2z7ZirEI8=; b=tC9HnKg4O2wqFtRoivT5cXzAo+q2HofQ4HGJ5061qAPXPGgKWMBBrWsxDszRcA/bmQ K9rE8abMEqltHD16FI8SMnTipn8XCvhxOFe+60F/rilzClwh1TLKsiMe61xK59XRqcr8 3qlKnnD55d++Lco/QodGtGjbOB9qzZlciCSBb2azvauxwBeP197bmVN7yla+gKoO7UeF VbUm5UmGpuAFiymTIrVTAWzBDPyi+GStGWdb7rxn6EY6Ln2De6Ba9sDrKZ9p5cntBB8y X4n/w4/fyb0EbSiTIIAN/3SOb+7AMAotpwtwirni4Mziu5zEmwIx4I6CgaZ8B5cVNf5x oz3A== X-Gm-Message-State: AKGB3mLelZe9FQRppCqm9Y2m/nW4dzOdyKAANq5CmTephSzbtuOAI2Jn PZmPhdSPovRnzcppvStAmq3J6abrDjY= X-Google-Smtp-Source: ACJfBovqwFOZW9fUmJJkdzMDzd7g4s9vGGpv9423hG2c4DPzGKskpW67s7wOo24IYHu3eTTRKBYq6Q== X-Received: by 10.84.212.150 with SMTP id e22mr14839849pli.447.1515487380527; Tue, 09 Jan 2018 00:43:00 -0800 (PST) Received: from tfiga.tok.corp.google.com ([2401:fa00:4:1002:3ba3:2aea:6dcf:30b]) by smtp.gmail.com with ESMTPSA id p85sm30869000pfk.147.2018.01.09.00.42.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jan 2018 00:42:59 -0800 (PST) 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-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Wu-Cheng Li --- 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)