Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp257300ybi; Wed, 29 May 2019 20:48:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcpStqBOkT+1zl4QdrbmugtEaUEg2talkMjG7k96QCu2Z9m98PktgmYs9T1Q+UD8WtIjG3 X-Received: by 2002:a62:ee05:: with SMTP id e5mr1529999pfi.117.1559188092490; Wed, 29 May 2019 20:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559188092; cv=none; d=google.com; s=arc-20160816; b=SB8xYHyjKuLA+XBS0N2O3pEM0m0Q1wQJ2y/J39IAomM8KCRNMKUX8nATIrPRl4ebQA owz9ZpiMAZWfb3YCdvvShEg7dn4zAfRFGahMvWCFjrW/2KQ2IhfDtsPesLId0f7vvtdx bKyd0qh5/jIGO0tEkrdhlor99YFreX5RMDQ9C4Kg1uWoMtkl2qW2j6NVNOJjbloGvRrY TPGa7QdPZFYKY/9TivxYcaYXje6MTG6RUjwwapUPSD1uoGXTRlse9ipH3ywCIE/rc/y6 1lZxAdtLWtNxCbTxSUoAL0GrkFQqsZPZzF18itMGcK8mFmkHlr6UOohb0PlCw8D8eGZV BluA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2YdjyrkfXCWy++dJZFe5jtAwzifMTwhGM3budRVFJyk=; b=ND0RSGMcJ6MnDBKSbdy2NsFo4fx+9bszDEXDyaTfTZ3v9t6MELR4pOMnvwutTyF4T8 l+S7/TFZIkKO1K+H5sFa7a1h8vxiecqcdNC5xFLETv+9a7+Brxgn1P4d6rf5Epu1b3Oj l7jR1u9YjcdRIiEqVffKFbqqddu2jkd7Uxp+43mnkZGLdETp+csnEEmplELpPTY2N56N x+9oJLN5Mv6BkxMdg63qHkMlzys7YCrkLQ0M1d04KqzdFrNL8qmqJW/fonk95GfKhIZD uSS/sLhejOvRobg/HAjIs0cD0fz44kXAhbVSDOtpQjC4kHxTisQTgC3FW6Pr7PUAs9m4 5flg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eCoj6KAh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l2si1761722pje.54.2019.05.29.20.47.55; Wed, 29 May 2019 20:48:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eCoj6KAh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732739AbfE3DpY (ORCPT + 99 others); Wed, 29 May 2019 23:45:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:60102 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732344AbfE3DUt (ORCPT ); Wed, 29 May 2019 23:20:49 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C34212497C; Thu, 30 May 2019 03:20:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186448; bh=ZCsxXdpu8EEZLeV/iQOFEU/H1o4X1Ff8AUSV1hp8S+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eCoj6KAhiPqhqat+bxIJiULZrKuL0Ua3SkO24/t6e5rIhuzOveA2T150eSQxAMrUe SayAgUOG0RRvXHYbInBHmdQC+l5kTcE78C+nVPB6kno4SzDfCVPkMNIwmEb/Cio4pM yxvm8AUOg9j5p/qcJIN+LycKV2x0PljnzCBEcMYs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 4.9 057/128] media: coda: clear error return value before picture run Date: Wed, 29 May 2019 20:06:29 -0700 Message-Id: <20190530030445.134089589@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030432.977908967@linuxfoundation.org> References: <20190530030432.977908967@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit bbeefa7357a648afe70e7183914c87c3878d528d ] The error return value is not written by some firmware codecs, such as MPEG-2 decode on CodaHx4. Clear the error return value before starting the picture run to avoid misinterpreting unrelated values returned by sequence initialization as error return value. Signed-off-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/platform/coda/coda-bit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/coda/coda-bit.c b/drivers/media/platform/coda/coda-bit.c index b6625047250d6..717ee9a6a80ef 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c @@ -1829,6 +1829,9 @@ static int coda_prepare_decode(struct coda_ctx *ctx) /* Clear decode success flag */ coda_write(dev, 0, CODA_RET_DEC_PIC_SUCCESS); + /* Clear error return value */ + coda_write(dev, 0, CODA_RET_DEC_PIC_ERR_MB); + trace_coda_dec_pic_run(ctx, meta); coda_command_async(ctx, CODA_COMMAND_PIC_RUN); -- 2.20.1