From patchwork Sat Feb 12 07:42:41 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: 12744204 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 70924C433EF for ; Sat, 12 Feb 2022 07:44:17 +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=ZOhW5fOo/X4Zu97ENyKUaGYIKxpIoilWYMSOBrtJzsk=; b=fQsgc06tdp1QC5 yOSriCnefvNIN8A/jQNy6lh+pv32dXqG5Nn3aXYxKnLJllL8gP6dkEDl9m/XyzHkilDE+BdOUUCZZ ++R94RLndI39jsQQzs55PC73oNiadma6qvHNDWnVmWnRpNv8M5iiLT51zrOOzAlQHe94WskOPHp7D ULHNRKYGphdQVXqWRpDubnjuXeMDQfR+sMlob9Otd8E9lv/vJ1qffr+HNoflqUR9oT0lJwhHUSMXq UJ3ywyD5H8oRBav9xMDlH32swf/xFnBHOWrQ1pirW5IcH08umtFelTEAh4Rn77tN46LdFlJ59WAcj LY35XF1O3Hj1cqnNQ4+g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIn3T-009YMg-Pu; Sat, 12 Feb 2022 07:42:51 +0000 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nIn3P-009YLj-LV for linux-arm-kernel@lists.infradead.org; Sat, 12 Feb 2022 07:42:49 +0000 Received: by mail-ej1-x633.google.com with SMTP id h22so9032443ejl.12 for ; Fri, 11 Feb 2022 23:42:46 -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=EkWXkKewPoFhmQKCPIXY6OJ14gKmezWp3+CXE5li4HY=; b=J57KOpvuDcRiVi6fAKqtJNgiUyt+KnQ5OMPQqtLdEIlei46C6IQUi83n5m38nQc+Vi VpPe/5ClLJdFX0x6EZiNfd2W0a2vlvf26YHyNPcfHVH2CteBHl9BSkelXeH21NUZkmN/ Ce3AtGY+y3wZxFztDmdLnSl/Ncvcm5z1M/6p8ijl5GE3G38CMRGCQJiW0NZQEzgUjbSM oQJmiwGBa/4mUdbhkz+nW8BOFyh+fUa91ww3RC56FgxcfZ7zJNhzWb/Rxaj1HoE9+66c NK/Fnu0JZuL5nBBNZ0Rfsg4DIQJOomjYjiIWW789YwUwoUZOHEpLCvztvdPbVuCq4lA1 Gmwg== 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=EkWXkKewPoFhmQKCPIXY6OJ14gKmezWp3+CXE5li4HY=; b=311hto2ohO4oG+MmrLhd5g/oR800ovN/fR3+9swmvgOg5OGmxI3MuR7LkYnsJfRx1R X5qrcKB1Bbt/cxb/tAzd/HMJ4p22qFXag+h7ENFWEiIo48ZLZ6r4Ktec+JOZOh29r66j nQHC7HW6LYLw17XJypCoE7fEuPMQom3/Hnskta9IqdPCRsb4Prrntfe2/0PmiV82I7Nn b2HtfkIwOEY83klCaodT9CNCOMXCwh9n+xdTuIw37ZWZvtWVn/lCGkZG7XVMxyffyO19 Hf6Vh/lCefUoaFeGtWsoHdf+F66LHTrfBb/4L2C9aIaRuh/OvEn/OHhlelCNEX25vbo9 wgvw== X-Gm-Message-State: AOAM533ZmxZoGP/sp4mZiP2mI9s2V+PZ+JuYypDcYrlRGIazLN56/rxS FJceVEjMYkn0u5xDhrCQB+Y= X-Google-Smtp-Source: ABdhPJySJr/9z9/AK53BzSB0SjeMcNIW1fPYpoxDyi0pm3Rzd+rri0GsDsaXSbzRyZh/X9GaTr17RQ== X-Received: by 2002:a17:907:94cb:: with SMTP id dn11mr3974252ejc.81.1644651765489; Fri, 11 Feb 2022 23:42:45 -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 w20sm1383205edd.79.2022.02.11.23.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Feb 2022 23:42:45 -0800 (PST) From: Jernej Skrabec To: mripard@kernel.org, paul.kocialkowski@bootlin.com Cc: mchehab@kernel.or, 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: H265: Fix neighbour info buffer size Date: Sat, 12 Feb 2022 08:42:41 +0100 Message-Id: <20220212074241.43184-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-20220211_234247_734571_C5EFCBF8 X-CRM114-Status: GOOD ( 13.55 ) 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 Neighbour info buffer size needs to be 794 kiB in H6. This is actually already indirectly mentioned in the comment, but smaller size is used nevertheless. 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. Bug was discovered using iommu, which reported access error when trying to play H265 video. Fixes: 86caab29da78 ("media: cedrus: Add HEVC/H.265 decoding support") Signed-off-by: Jernej Skrabec --- drivers/staging/media/sunxi/cedrus/cedrus_h265.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c index 8ab2d9c6f048..44f385be9f6c 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus_h265.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus_h265.c @@ -23,7 +23,7 @@ * Subsequent BSP implementations seem to double the neighbor info buffer size * for the H6 SoC, which may be related to 10 bit H265 support. */ -#define CEDRUS_H265_NEIGHBOR_INFO_BUF_SIZE (397 * SZ_1K) +#define CEDRUS_H265_NEIGHBOR_INFO_BUF_SIZE (794 * SZ_1K) #define CEDRUS_H265_ENTRY_POINTS_BUF_SIZE (4 * SZ_1K) #define CEDRUS_H265_MV_COL_BUF_UNIT_CTB_SIZE 160