Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp251035ybi; Wed, 29 May 2019 20:39:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwAzI880LSGK60zGOnSdYeAxEGD0FMva+MLcTxk2xFB3rl4VvWCC0gPom4vArK5QnN5I+fl X-Received: by 2002:aa7:8acb:: with SMTP id b11mr1509677pfd.115.1559187596014; Wed, 29 May 2019 20:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559187596; cv=none; d=google.com; s=arc-20160816; b=ZNDp/qyvei6mZaXX07MN787HkDCf/PHuwT35/YQWNgoXxJDK8Oenp0M+tBDfoPvVnH JrOoPh1KjENucluedF/XQGgjFwTf07xDn0nw9mBZOR7/thi4pdaym+GT8sSHmtCSU0lG xUdQPf1L6xf/2vo8VUC3k/rH076LIZ3CRlzLN4Zoy9X7v0GXU0j80kqJzjIg0aXFCNEI /nqtB8pVIcxad3vuIGRfVcCMkaE6iDmGqu6ReWqdMhe3iOE9ddK/15vqAGcV1SPVck9D X7PttI1RYWW1LyNMfGTcVw98xzzhcxR8hKg+gWr3xIZnXJxhBfrloiAB8wzNb4eN9Y3H k4SA== 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=blHmj6WL2oxvElLivf8GMwyD3riswY/QwXTcBfzksWc=; b=TaYuShU/05tGmYCFIva5YwKvwURt9Zbc320vMSz9eUbBAHk4B6vOO3R/R5qDvGdsFG cun9weflE/PwjE9Edl1xH+ffkaVQfKYvqOIhJ1GhzUjbslGrPVgsBnneioBjKJgYDn6d 3cLQNfbGlHxmPlvbtaFhr2Zc//b77YmfaVDDfDaIIwP0tLnu0Lain0GbSqisDTozsoi4 odvd0D3/FahR6gaal66+RMpzPuAn3lmo6yRi3ODXd7MFkzX+iMbaA1wJxMAGoDlreH92 7aZCs+IP/fvUMBbGwQ4MJhqK9UGQJhD91UVUTNgjAJg7Vq90aJi1+Bbc6GWViGGp/KRn qaEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Iq95Njru; 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 f3si2063749pld.434.2019.05.29.20.39.40; Wed, 29 May 2019 20:39:56 -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=Iq95Njru; 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 S1732928AbfE3DWt (ORCPT + 99 others); Wed, 29 May 2019 23:22:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:45024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730915AbfE3DRG (ORCPT ); Wed, 29 May 2019 23:17:06 -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 83BB424667; Thu, 30 May 2019 03:17:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559186225; bh=IszB0OOQeLjmgoIzz1bL/59sa6EgoYvgOFPYwjoubSg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Iq95Njrullp0gRFwafxRL+cuQRoK8jlytBpueQiw9cn4Ijn2+kLTlLOsQbqo+l8th Jc+ouKU/MMsJvrjAkPxBeiHMiHcLow8qDhLNxnvaOZuzWBUlomxb2WN9XUIEskH6Yp sCEQr9bNJ/S5GYucPzUkCuUL0/tjkdzH57sXpAzY= 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.19 121/276] media: coda: clear error return value before picture run Date: Wed, 29 May 2019 20:04:39 -0700 Message-Id: <20190530030533.435208596@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190530030523.133519668@linuxfoundation.org> References: <20190530030523.133519668@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 d20d3df5778bc..a3cfefdbee127 100644 --- a/drivers/media/platform/coda/coda-bit.c +++ b/drivers/media/platform/coda/coda-bit.c @@ -1999,6 +1999,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