From patchwork Mon Jan 2 13:23:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tretter X-Patchwork-Id: 9493557 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 2506D62AB2 for ; Mon, 2 Jan 2017 13:24:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 173C9223B2 for ; Mon, 2 Jan 2017 13:24:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0BCE82679B; Mon, 2 Jan 2017 13:24:29 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham 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 C085E223B2 for ; Mon, 2 Jan 2017 13:24:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933022AbdABNY0 (ORCPT ); Mon, 2 Jan 2017 08:24:26 -0500 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:47673 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933014AbdABNYZ (ORCPT ); Mon, 2 Jan 2017 08:24:25 -0500 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cO2at-0006QK-L8; Mon, 02 Jan 2017 14:24:07 +0100 Received: from mtr by dude.hi.pengutronix.de with local (Exim 4.88) (envelope-from ) id 1cO2ar-0006BS-RD; Mon, 02 Jan 2017 14:24:05 +0100 From: Michael Tretter To: linux-media@vger.kernel.org Cc: Philipp Zabel , devicetree@vger.kernel.org, Hans Verkuil , Mauro Carvalho Chehab , kernel@pengutronix.de, Michael Tretter Subject: [PATCH v3 5/7] [media] coda: fix frame index to returned error Date: Mon, 2 Jan 2017 14:23:50 +0100 Message-Id: <20170102132352.23669-6-m.tretter@pengutronix.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170102132352.23669-1-m.tretter@pengutronix.de> References: <20170102132352.23669-1-m.tretter@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: mtr@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-media@vger.kernel.org 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 display_idx refers to the frame that will be returned in the next round. The currently processed frame is ctx->display_idx and errors should be reported for this frame. Signed-off-by: Michael Tretter Acked-by: Philipp Zabel --- drivers/media/platform/coda/coda-bit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index b6625047250d..309eb4eb5ad1 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c @@ -2057,7 +2057,7 @@ static void coda_finish_decode(struct coda_ctx *ctx) } vb2_set_plane_payload(&dst_buf->vb2_buf, 0, payload); - coda_m2m_buf_done(ctx, dst_buf, ctx->frame_errors[display_idx] ? + coda_m2m_buf_done(ctx, dst_buf, ctx->frame_errors[ctx->display_idx] ? VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE); v4l2_dbg(1, coda_debug, &dev->v4l2_dev,