From patchwork Mon Feb 14 19:08:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jernej_=C5=A0krabec?= X-Patchwork-Id: 12746029 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EE18FC433F5 for ; Mon, 14 Feb 2022 19:09:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=grZh6qSirESLbQma9hO34+2AJXR2BSOnFbk7aWnoPR8=; b=vhQaPwilmFK1Cv 9hjm+5Z7bcFAuErFMY5sqt8qA+zb4bYIlTn9OepOtvBdJr7jpa+FwFHW36ETqrHy7eFthkSBqgLk1 g3gR0mPEmkvAjKMZzUjHNRlX0xlJIszh4YLjW7hZK/mqcWexbnikHc3aM8E4NDkb5yLfsSXeq5AzD /M7QKOf4ZAO6En8FJGYxqrZLJsMWrLCpHO1qxvX13xEzRP31n3agX18k12TEKvwEAkamzXsInACZ3 VBWEAVD6W9frZe6aaGM9k9ieIV93QewS7vj7VNecWf+dT8K4J+vznsYQSxLn1axc/CB49Qi/5RmjU fw90z6aGZWYxhxDPg+nA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJgiR-00GfSY-I7; Mon, 14 Feb 2022 19:08:51 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJgiN-00GfQo-VG for linux-arm-kernel@lists.infradead.org; Mon, 14 Feb 2022 19:08:49 +0000 Received: by mail-ej1-x636.google.com with SMTP id hw13so10941161ejc.9 for ; Mon, 14 Feb 2022 11:08:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=99BahZfDqfQoln2rf6Bj3xU3QXecprDtHuHMCBkgrcQ=; b=qhf19N3SLoLekl8nSgEbpHiFYk6ResBtkXfsJl63wafe0VQ0y5uwdcbx4dh7Api/cr pq4kpVN3rz8ufkFRa9PQhw12DgU06aBBMlGjIZ82TXZkn5kbidmhueb3xMvAz8cyvLFK 23OCsQ5snWWXIQrfygum5Ml7tz1ev7oa/U9muYVV8pA1ru4b2uJnVoNiHqJAUlw6HTVD 4YwuEf7WP8XA/Rm/UEIkIOK+MRnmJTKW4dRGuT49tZEp3Adgnjs0GNTOr22NQe/Yb5r4 ZRdbMxoYgxE3NBz9Kcl1JoZpZ2VWWqZLEqmaXpiuwLy5eS4Rlf+vH+mqr6eGRoqwxN34 hTIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=99BahZfDqfQoln2rf6Bj3xU3QXecprDtHuHMCBkgrcQ=; b=h4eB1wxKdQvro66xYZT+Gk0cK9al9wAC8ZkNEiygy4GmigJCenJ8V7niQ1foBWCfa2 Y3OIKp+OQcXcJEkP94yovZ3PgypzlJZ1Owf/7U9VEV/s6K/zjpYT6KjVii/PmZ8M1wDG 1ruEwdyDJixb3UM/aZC59u6OqfAItKm70GY5+dQxNCsM4YSPv66Z86lcn4oCmyjcUSIf FTNqx8ZsIcb/StOXUI157ciwPs/wAOCxsZMXQrw+EsarMxw5OO3MVXxfThSa0TMoKdgQ DINTOko3Jm0sqMdBL57Gb18oHTlbk7UFuJXFlHLDUQkXZjOszwGdXMdWF/WcXu/rjV6+ /s2Q== X-Gm-Message-State: AOAM530B9s7lm7NNe5hFWsTNEEtzmLHfo18dNTCCUGOtZXhP7ItJ5+8a qi9Ed5rzfvDf/D105sxR31E= X-Google-Smtp-Source: ABdhPJwiFYCfncVtqTqjdVCBhQycol1aX209bItLXOycZar8UGc4dq3/BcvtHafFwyhS52svnZjIdA== X-Received: by 2002:a17:907:16aa:: with SMTP id hc42mr167762ejc.307.1644865723011; Mon, 14 Feb 2022 11:08:43 -0800 (PST) Received: from kista.localdomain (cpe-86-58-32-107.static.triera.net. [86.58.32.107]) by smtp.gmail.com with ESMTPSA id m17sm2316338ejn.118.2022.02.14.11.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 11:08:42 -0800 (PST) From: Jernej Skrabec To: mripard@kernel.org, paul.kocialkowski@bootlin.com Cc: mchehab@kernel.org, wens@csie.org, gregkh@linuxfoundation.org, hverkuil-cisco@xs4all.nl, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH] media: cedrus: h264: Fix neighbour info buffer size Date: Mon, 14 Feb 2022 20:08:39 +0100 Message-Id: <20220214190839.707889-1-jernej.skrabec@gmail.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220214_110848_031584_574A34CD X-CRM114-Status: GOOD ( 11.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org According to BSP library source, H264 neighbour info buffer size needs to be 32 kiB for H6. This is similar to H265 decoding, which also needs double buffer size in comparison to older Cedrus core generations. Increase buffer size to cover H6 needs. Since increase is not that big in absolute numbers, it doesn't make sense to complicate logic for older generations. Issue was discovered using iommu and cross checked with BSP library source. Fixes: 6eb9b758e307 ("media: cedrus: Add H264 decoding support") Signed-off-by: Jernej Skrabec Acked-by: Nicolas Dufresne --- drivers/staging/media/sunxi/cedrus/cedrus_h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c index b4173a8926d6..d8fb93035470 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus_h264.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus_h264.c @@ -38,7 +38,7 @@ struct cedrus_h264_sram_ref_pic { #define CEDRUS_H264_FRAME_NUM 18 -#define CEDRUS_NEIGHBOR_INFO_BUF_SIZE (16 * SZ_1K) +#define CEDRUS_NEIGHBOR_INFO_BUF_SIZE (32 * SZ_1K) #define CEDRUS_MIN_PIC_INFO_BUF_SIZE (130 * SZ_1K) static void cedrus_h264_write_sram(struct cedrus_dev *dev,