From patchwork Tue Oct 27 13:46:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 289661 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=unavailable 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 3D10DC8302A for ; Tue, 27 Oct 2020 15:43:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F39CA22265 for ; Tue, 27 Oct 2020 15:43:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603813426; bh=COzXjeP2t5yg39+A+MrUW470iAfirS3n43vG/ABDRUo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=lH04LogSh7HFDpFcFZ0Ir+vpo8+YYZGSm+TdB1PtAbfOcqKyQToEvlYVLLt/Ur29s Uv23mVTgYPpoT5RYM7ZkAE6oefp5aPoreqf/7e0sgWyepdoyhOmEts79Kzc+MFfNZ2 Q3JlqZVRIYMAe6FgVd0rlFKNk3kLhZjlLy8uK4Rc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2901406AbgJ0P1b (ORCPT ); Tue, 27 Oct 2020 11:27:31 -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 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 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;