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: 10151185 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 5633760223 for ; Tue, 9 Jan 2018 08:43:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4706928627 for ; Tue, 9 Jan 2018 08:43:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BD7C28676; Tue, 9 Jan 2018 08:43:22 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C6A7428627 for ; Tue, 9 Jan 2018 08:43:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=d1ZFBT2+wLFBNLMM405rYXeS7qWMzxB2yba/c8uTo30=; b=bJi Hb7bXKxpWJIyOhk0Fe9HbGsM1WOV0fI99JG4J+w6aoJlV3+11DUVDO4XCwzKaqxM1Ym3sL+zuwZHi vaAVka43TfjAfV5pqjsrXIlmQzmSIv5f57P2rNjWuuMwtlotEzSeub7DkI4LDI9J3gaOnn90XWoxt q+amtsrVECc7jPC/JkgMeByY2pQAyc8pNUWwDw09I5BnFTwheDhmJm9emE/4E+IEDPPENTIKfK16D BtfiJHu7UUdxyHJ0pp+4A7ghiN+/i+eZTHD+9m8pxfDHJqvsp3BzQ6iypA3J92Ua9z1MxUutye9Xo oaiWXeCxQqyIiOG8rmqy68zg4d3X2ew==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eYpV7-0004eP-AW; Tue, 09 Jan 2018 08:43:17 +0000 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYpV3-0004cg-Ci for linux-arm-kernel@lists.infradead.org; Tue, 09 Jan 2018 08:43:15 +0000 Received: by mail-pg0-x244.google.com with SMTP id f14so4967261pga.10 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=ssMVLgwnxs20VQ8o14q+cof1z3dsgO54ueamvVlB3HgCJN+inJQG29pf2eVyLJBlTq EJ2Lu2VzJ8S3G/sGKhx4M3bu3QUFMi/+pKH7wShByVHLo5Bay4OgfXq3Sy1rQhb0yv4x KKvk47dwgvql5c3Mm1O8NkqGhyZfTUZdG8p8XIz2GxDhvZUkmbfgI9BgJwFY2yBTJiu5 kj54TCiJNBBdusky7g5zm0tOxpvKwGZI8aZA9l0iZRvgwI4xmRadow4cKiC2axmUOWLd gK1h9jfb99PkS3OhQkH9uiFnTwLNV36/H02MtHvbmSd/GcC0n8Ozg8bNKTMb9BTk3XOo EivA== X-Gm-Message-State: AKGB3mL9TPHq36tSNflpNPx9AdoOHS4Mj0fw31Rg9l/0EQnLTtOiS1jV Sozkljw45HcxtkSqIaBKPRT3Cg== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180109_004313_488430_45586160 X-CRM114-Status: GOOD ( 10.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew-CT Chen , Tiffany Lin , linux-kernel@vger.kernel.org, Tomasz Figa , linux-mediatek@lists.infradead.org, =?UTF-8?q?Pawe=C5=82=20O=C5=9Bciak?= , Matthias Brugger , Wu-Cheng Li , Mauro Carvalho Chehab , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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)