From mboxrd@z Thu Jan 1 00:00:00 1970 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 4DDB4C55179 for ; Tue, 27 Oct 2020 15:30:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0E15A20728 for ; Tue, 27 Oct 2020 15:30:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603812624; bh=COzXjeP2t5yg39+A+MrUW470iAfirS3n43vG/ABDRUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=0I0Ji7OObd/wZ+AeaO5wX+FVQD2iYMt1Vv1CroPd7WUzGfizOQWvPMv1lCxIuHCTE PqZAi7IPhC7Jp0iO+NM0/kQ5HBQQmGtXUZB1LrbvyZ7+gvXHgWvg1UfaRs40Hv4z2r urqHQoO4ZJ7hRUBTIHpxtJEHawSi9lR/IcQp5twM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1799222AbgJ0PaW (ORCPT ); Tue, 27 Oct 2020 11:30:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:38386 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1797404AbgJ0PXW (ORCPT ); Tue, 27 Oct 2020 11:23:22 -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 609B22064B; Tue, 27 Oct 2020 15:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603812202; bh=COzXjeP2t5yg39+A+MrUW470iAfirS3n43vG/ABDRUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dSiX3+pTzb9asNvAwuQ9+W1X2fhOc5YP7gXKuAyQJlh4SbsmHwNNvo+pSx4VILMqM VzWQ3j1Qh69EuotcXZC8QkfKZtQwqj3HLjyD4RKsOSPwIzvo4r+CT/5VmGrA4Rgnhv Ifrt7v7fcf6/pobuJ3C5cQtjLDOdxHD6h8Mnl2nM= 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.9 127/757] media: hantro: h264: Get the correct fallback reference buffer Date: Tue, 27 Oct 2020 14:46:17 +0100 Message-Id: <20201027135456.536573669@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135450.497324313@linuxfoundation.org> References: <20201027135450.497324313@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 194d058480777..6dcd47bd9ed3f 100644 --- a/drivers/staging/media/hantro/hantro_h264.c +++ b/drivers/staging/media/hantro/hantro_h264.c @@ -325,7 +325,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; -- 2.25.1