Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp305265lqh; Thu, 28 Mar 2024 02:35:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU3YYxyiZi7IGrpjkdcXrGpE6qU/UTqZ3elfZP/GGbptzPjRGt5HhmI+vuzRMLc6nWKTOrRnDArjDyJcAmYzEP6qvCAU7tQ7MewPPsIfw== X-Google-Smtp-Source: AGHT+IEveykqQAucdCDCL+71TveXSF+1PhRjs8Fd7B1LBokb5lq/iHy42mqyN5dYY3cBxpMB8/r4 X-Received: by 2002:a0c:edcf:0:b0:698:40f5:3c2d with SMTP id i15-20020a0cedcf000000b0069840f53c2dmr1273156qvr.63.1711618553699; Thu, 28 Mar 2024 02:35:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711618553; cv=pass; d=google.com; s=arc-20160816; b=kyT8HgxAFnj8rJTVcysuSLvdYz5ZdAPOlixrP51crQCcSkD02BFFys/wxquaDH9gjo jPJYeqUl6IvzDxjU6LAJ9FUud1VFBK3udXvhUsfLV9J23/7ldz0ehWdnWgLKe8Y7D4u2 IK/nLLrgI2W/Fblo9WAKO3SGRAkxhxt2zZiYlRqX62AQ1WC8QVnL6oZkeEevhaXswWbo CfL2afR70QcTCDv4b8plAvIvUqkdARzMukDh/BCmUfMdfjsViFZCiacmFGoQ6PREQOiw puqzYwwHs0fygr6vt18T1OxGVcd9LGbPNLg0Y2ftj4IuoBOkxgArOZar/ZJjcOKz9B2m bCvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ZOLEP22xy9fzvAHeQERxgOyuTkQ2ABHTS9EnPGMWMQw=; fh=QrW3nXHuSsDhDrB9fLxfFTg2VFc3ASSY4Eun5Sjr0BE=; b=W46fWLhlrlFhtLpeQXOx9tClcUcD59/SoezpUzValKMPD3dwN/DET5Dog8gb8cjJXR 00bSRx+qE1b4dnha8mAX4i/KhI9BbC0oykSzRQ/U85VzvxgGCi+TiXd5ljKFDSz5g86Q SRpuB22n1PYo++UBJbB/2GvewDrDOYjQdBJo3jaCvKyonpcX2tpxNoGl6TJkXTB+O5cH lbZAF0FoddvnrJDKkDZS+EcKZhcqpn3VwNBK6m8zSeWkprxNtiWZRxnxEJd0tbtSK0F+ VW83uTmnfX2V7+SMGGO/OvLRwsF3or5xwQomrX0r5ySUpd4KcIxiokn4wOi7Y9hTY2oI rPoA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Pu6dubfd; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-122701-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122701-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y17-20020a0c9a91000000b00696b287b486si1019131qvd.522.2024.03.28.02.35.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 02:35:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-122701-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Pu6dubfd; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-122701-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-122701-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6EC051C2EA47 for ; Thu, 28 Mar 2024 09:35:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5D2347CF34; Thu, 28 Mar 2024 09:34:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="Pu6dubfd" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7005556B77; Thu, 28 Mar 2024 09:34:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711618490; cv=none; b=L+L1tsZV5hIiIouqdTztZuCXhU8nW1db/fBb36MzXE6L9Pafphv+fL94zIdUbHBwVhFLm2F8fZS8OgVYKD4BqVjSybZFJXlaJ/n1aEHrco/FViR+epaaTkhGQCeBgDPvAgxBrMU5xvjNRc2gicF7jR9rar8OnLxIvurbv0IcLwE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711618490; c=relaxed/simple; bh=kLtyFp4xpElNNw1K4yeyOMlFT9DpiyV8sV6LRNkBK34=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PjWGv+NHLYq4BmA8vfknxza4kfuDwUJgaW2JgTIxHs0JcuIrn9WqKZAPNNkzy7zBL+gEyYCilcDfel9pPtTyM/vLEw5kdqt3eiy9GVhesaCwzNVoYwV32iZi4clsuZIZu90ScGXIimDKP81iXKjBuaBhS4brkKozyXihkbIKdPI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=Pu6dubfd; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1711618486; bh=kLtyFp4xpElNNw1K4yeyOMlFT9DpiyV8sV6LRNkBK34=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pu6dubfdXWeWVQ9ggcqmSJU6ycEO3YZkVSCugE5GWeEIWJIntrNGSHc3gZL6nQYQZ Cslw71C9bW7d3X8F1WkTVKDN4YQ+algt4Gaa9OGAMoR/6EgQcjUWI4mo1Ow5cd3o+3 LWLUxKc8Y8zGQbrKxryh/bqWXBvCdwo5MzAeAsxJOi8O/o/nxT6ZcOy59vVUvMMo8L s+9Q7aljhatOWm83RO8Ht4/q7Q2bCxZCYV0sIrTVGHVmhHNAxtb8949qR8AAXeypgO jZ8eKLc8D1LkBE8zGzqaQZwfAMyDV3/gGzncja7uKkEJ1J12fGk2PGBLqxTLx2/A7n ezY6bAHGV5o1w== Received: from benjamin-XPS-13-9310.. (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 187A6378211A; Thu, 28 Mar 2024 09:34:46 +0000 (UTC) From: Benjamin Gaignard To: ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, mchehab@kernel.org, heiko@sntech.de Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH] media: verisilicon: Fix auxiliary buffers allocation size Date: Thu, 28 Mar 2024 10:34:39 +0100 Message-Id: <20240328093439.18712-2-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240328093439.18712-1-benjamin.gaignard@collabora.com> References: <20240328093439.18712-1-benjamin.gaignard@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Use v4l2_av1_tile_info->tile_cols to know the number of colons in the frame. This made auxiliary buffers meory size computation more accurate. Signed-off-by: Benjamin Gaignard Fixes: 727a400686a2 ("media: verisilicon: Add Rockchip AV1 decoder") --- .../media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c b/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c index cc4483857489..65e8f2d07400 100644 --- a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c +++ b/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c @@ -257,7 +257,8 @@ static int rockchip_vpu981_av1_dec_tiles_reallocate(struct hantro_ctx *ctx) struct hantro_dev *vpu = ctx->dev; struct hantro_av1_dec_hw_ctx *av1_dec = &ctx->av1_dec; struct hantro_av1_dec_ctrls *ctrls = &av1_dec->ctrls; - unsigned int num_tile_cols = 1 << ctrls->tile_group_entry->tile_col; + const struct v4l2_av1_tile_info *tile_info = &ctrls->frame->tile_info; + unsigned int num_tile_cols = tile_info->tile_cols; unsigned int height = ALIGN(ctrls->frame->frame_height_minus_1 + 1, 64); unsigned int height_in_sb = height / 64; unsigned int stripe_num = ((height + 8) + 63) / 64; -- 2.40.1