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: 10151187 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 AAC2C60223 for ; Tue, 9 Jan 2018 08:43:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BB3D285FC for ; Tue, 9 Jan 2018 08:43:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8ECE92863B; Tue, 9 Jan 2018 08:43:44 +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 3051B285FC for ; Tue, 9 Jan 2018 08:43:43 +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=WXk8vhblD1AbSLRX954DY3FVWAG7b6Jr/glWimUkSOA=; b=r3g t1kef/OS5En7KMiqXBQ3ARXW0iU5J24x3AbUb1GSde7EDRGJIwqteuDhFSca1GbpwT7dRVk9RVgQP asUudTU2LKlsSbQ46qEeUXsxvH2aE5jmrTijtZi2nDFOCH9QPFuW2mmH7Hi28mBtFhPzrUnwpjpRz GcZYrJQhSeaVIN/a+oTcWsio21PO4vy72unbib1Wyvf6cyINb2m46Wk5IBUdund8uIhvv7x7ToZWK CPbwg53E/nzM1OcmbPw0UTXrN9DZuXiAuksZdbpTry/1y5jZQxo1AHwkKSDrVoZTM2oqVAV1pwuiF tM3C0lwkY1uG5AB8uaUkeMwP6u4Y73w==; 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 1eYpVU-0004si-54; Tue, 09 Jan 2018 08:43:40 +0000 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eYpV3-0004cf-KV for linux-mediatek@lists.infradead.org; Tue, 09 Jan 2018 08:43:15 +0000 Received: by mail-pg0-x241.google.com with SMTP id j2so6333184pgv.3 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=aQxnnfBIzXDOEAqKxyFll3HUjrGNskGD4Zx7RCiBZVE9/He9cQSDl8G0oFtpM6P3oF 9mYOls0rOS0Zx9xTtIA3lBdKTBDB4N5uMVfN2/z8DQrmJsO30D87GB2WL/fk/2tfW6PX VJyQ7jHbtrwwwxDlHmiO2Asv1ZeDdNmLYSqynNbi7nJ8auRzaQ2Qw/+CO3bFymgKv6+q AaZeDUyr1Pc1UJ2AuClgrVMvPqObt4xADe3DVZCN/ECc5TirYwPHX/bOBjuGI120yKb7 gJfz24z5kAF7mxW7WJnHoQDlVUNZJAJyDf5oLxNirkRYXBAH6zE8TofBwO79sC9b050J H7ww== X-Gm-Message-State: AKGB3mLv7C9GAZ3f9QCg6istMafQ3Dg+17BoR7tJRfXxYVPF1dac2gCa x4Wn+uK3hJDuTZcJzFndX2XN6Lkz96Q= 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_678829_E8CD1492 X-CRM114-Status: UNSURE ( 9.50 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=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)