From patchwork Tue Oct 27 13:47:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 312049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FA80C64E7C for ; Tue, 27 Oct 2020 17:25:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 310DF21D24 for ; Tue, 27 Oct 2020 17:25:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603819553; bh=zkd7q0Uq6uwQk2LPnmYqMvVnanGpNIubGF71A9KBZ0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=pPuIXdgPRTUIkcsjI+kdnPz6cs89NhNvzh3ZFK7dQrmPDnabNSAyqABhJFTV7ylb6 PdZKxHi4F6qpbfLhfBcZ6No97BoHHstkrGqMXkzwqlfQF5tyQu5F4HOKJ2jbBsd+Dd psj1DNHAP9uwiQ/ZlU8/+7uks48Ev2HN61K9iGng= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S369841AbgJ0RZu (ORCPT ); Tue, 27 Oct 2020 13:25:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:53790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2441497AbgJ0Ox2 (ORCPT ); Tue, 27 Oct 2020 10:53:28 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 14B5022202; Tue, 27 Oct 2020 14:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603810405; bh=zkd7q0Uq6uwQk2LPnmYqMvVnanGpNIubGF71A9KBZ0g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DqWl07+AChdFQFyw4Su9akUNwbNFfqe1YAUvMZrp3LYowbPFvfp6W5Y7myj1/rcxH 9vspA1ye0gepr7Zoy62lHEGmse4guSck9y0zEDhZm/30lx4aPwwz/KLIU7lEk/qsWK msJjsAqFZXc2oSlKx+mnTU3/ttexyMTk/n0K5uFw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ezequiel Garcia , Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin Subject: [PATCH 5.8 110/633] media: hantro: h264: Get the correct fallback reference buffer Date: Tue, 27 Oct 2020 14:47:33 +0100 Message-Id: <20201027135527.850384938@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Ezequiel Garcia [ Upstream commit 6d9e8cd0553bb03e8ab9d4d2d7d17f3fb639bd86 ] If the bitstream and the application are incorrectly configuring the reference pictures, the hardware will need to fallback to using some other reference picture. When the post-processor is enabled, the fallback buffer should be a shadow buffer (postproc.dec_q), and not a CAPTURE queue buffer, since the latter is post-processed and not really the output of the decoder core. Fixes: 8c2d66b036c77 ("media: hantro: Support color conversion via post-processing") Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/staging/media/hantro/hantro_h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/hantro/hantro_h264.c b/drivers/staging/media/hantro/hantro_h264.c index d561f125085a7..d72ebbd17a692 100644 --- a/drivers/staging/media/hantro/hantro_h264.c +++ b/drivers/staging/media/hantro/hantro_h264.c @@ -327,7 +327,7 @@ dma_addr_t hantro_h264_get_ref_buf(struct hantro_ctx *ctx, */ dst_buf = hantro_get_dst_buf(ctx); buf = &dst_buf->vb2_buf; - dma_addr = vb2_dma_contig_plane_dma_addr(buf, 0); + dma_addr = hantro_get_dec_buf_addr(ctx, buf); } return dma_addr;