Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2097847lqo; Mon, 13 May 2024 07:52:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXc2LHy9Hd8D0eW3B8aIsSE+1qcO7TQrWTnsygGLMfLc/FhxwDv8Kfz70rOcVgjw3AnUf64HOb28haIrRrC1pUgl7uhfyu3qbx7rJXq7g== X-Google-Smtp-Source: AGHT+IG9JZaPuzwUTpxKQmViD6IL8x2pPPf3NHluUfK04gxc2tcSF+dzanf6D84qVjWUA29tQ0ws X-Received: by 2002:a50:aa94:0:b0:572:a731:dd14 with SMTP id 4fb4d7f45d1cf-5734d6edacemr7448431a12.28.1715611962978; Mon, 13 May 2024 07:52:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715611962; cv=pass; d=google.com; s=arc-20160816; b=YvfDbGLRbWOIg6ngybL8udxn1dUgs7d85/NslK5b5AOTFiZs+JX5hbLRjgkkEHlq0k EOHGMDhO5iY7SBAQHqfiaGW+4QR5XQ2z/4GcmELSDTP4LttB4+3hTSHDRk7Z8/jwQCVl mwE4cn6HFYPBIElEcu4LAJcc5D4jFHceRcxTvlcVZEhYUG9bypkgeVUmRXuBdGnAlJo7 mkqcr2LBmgBSsCc49U8AdZ2REajZdfS8pvvUTmSIzeyh++CAYt2yx3mEMwWXs6bHbweG dEKclKkH3pr0XQPr5eRFqX32U2Q21GuNFUekZDm7LoSr5/jX2k8YN/3C1JzYKgZfMyqD RWxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=hhKhm0AO9oTmXQtrrZDa0qNatEkLLpoRvDsHsAsBzRw=; fh=qI8Qx9duOznSdYayuiMAJO/HhlJaN1X3MHbcDbgID/c=; b=Vqppqc+V4kDS6y9jS0MyMJFzLRLzicZceEvKcMch//Uhe8pSERMXAoY/wUNOYi9czr cOcpNLhmWHCwQh+lGEClLX3sxScMf5aiqjXCpVhDR37wFSJSNqqi9y8eGb/v6WiRQ2z3 2F5UAmO+qExMvo2zgRs1COZaxKPQib2VGrKxWhu95AFJvJrftSZmBZBV1JmgOMS7YRYs AX+7pItbp0O7zIVCveIw8lTg0SoYb0rsX153k+T9wdDb5KfizSdMZ5zlBk/t6B6/BmAb Phl0IVRepZafiha5MAVmBab+tmHcsZ4EE6/U2ywKRZjeCX8o6vQqKrzoREPl/OgUqHju C99Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="qW/lUqtX"; 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-177710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c2d5704si5377312a12.319.2024.05.13.07.52.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 07:52:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-177710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="qW/lUqtX"; 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-177710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-177710-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 am.mirrors.kernel.org (Postfix) with ESMTPS id B30781F22286 for ; Mon, 13 May 2024 14:52:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 090AE6AC2; Mon, 13 May 2024 14:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="qW/lUqtX" 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 AEE114689; Mon, 13 May 2024 14:52:24 +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=1715611946; cv=none; b=fBPfpIdX5axMn0ac1AN2cF+d0LMdgsYJTC6bNc6fkRHt4yg+HanFf5/ffmNJyescgPBANGVslh3O21MUFrE3nH1Ndv3CkCAMt1JwyyHE7VKjm52Zq/mF24IEBl496cMIGzXtLvkO9yTjYT7f7MBTUlTN6nKk0fk0MQkCpjkjzXU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715611946; c=relaxed/simple; bh=dGPesChjn6zfCGN+uZgQZ6d6gonk0aHoo23Qown8aUw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=aJveKTJg6ks4FZh28Va//5X0/C3ZkeDVhJDKMok8/ljOlDFBPXzcKxrjd0Bp31j9Ow6D8rsQcIsqt7M2/PENubIQ7bwuISZ5RCN/hnTdzdfKde/b1qL9zNEXLwfk2mQvE+Q/Eb1qMkefbAN1BMyOSRMnURQC6qfAVW6VhzrR6kE= 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=qW/lUqtX; 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=1715611941; bh=dGPesChjn6zfCGN+uZgQZ6d6gonk0aHoo23Qown8aUw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=qW/lUqtX+1mZwPJhOnBSNA9bxBp3Wrew4U5lRRZuUEl/R0qI11+fDk3Glorw5HxMA GUnRqWAudolecol5X8Weo8OTh9fLBQgAX6BAIJyds/FKJCp9uheAfobi7I5to1nCpY aSKkXJZVP1uX5HYSOm5/wikVCvq1fSQWES3SCUIeZIkaTkKlw+66WVVUdjD+7W98UL YYLm2kyeMoReMZI1o3Kg9ZN98kRJcokYMDvgzfHkcSw56nD5VcD2wzE1eWuD2ubR23 TvodC8+bZeW5qQxyuNimLx8Z9z25m5AQHwrSp+X7R3IvgF4ZmA1vRa0ONWpVtsFC91 5lNfaJq23oiVA== Received: from nicolas-tpx395.localdomain (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: nicolas) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 6A2ED378216D; Mon, 13 May 2024 14:52:20 +0000 (UTC) Message-ID: <8a6ec70f8054979db20fc7f62d12d4e4f5747324.camel@collabora.com> Subject: Re: [PATCH] media: verisilicon: Fix auxiliary buffers allocation size From: Nicolas Dufresne To: Benjamin Gaignard , 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 Date: Mon, 13 May 2024 10:52:14 -0400 In-Reply-To: <20240328093439.18712-2-benjamin.gaignard@collabora.com> References: <20240328093439.18712-1-benjamin.gaignard@collabora.com> <20240328093439.18712-2-benjamin.gaignard@collabora.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.1 (3.52.1-1.fc40) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Le jeudi 28 mars 2024 =C3=A0 10:34 +0100, Benjamin Gaignard a =C3=A9crit=C2= =A0: > 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. >=20 > Signed-off-by: Benjamin Gaignard > Fixes: 727a400686a2 ("media: verisilicon: Add Rockchip AV1 decoder") Reviewed-by: Nicolas Dufresne > --- > .../media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_de= c.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(s= truct hantro_ctx *ctx) > struct hantro_dev *vpu =3D ctx->dev; > struct hantro_av1_dec_hw_ctx *av1_dec =3D &ctx->av1_dec; > struct hantro_av1_dec_ctrls *ctrls =3D &av1_dec->ctrls; > - unsigned int num_tile_cols =3D 1 << ctrls->tile_group_entry->tile_col; > + const struct v4l2_av1_tile_info *tile_info =3D &ctrls->frame->tile_info= ; > + unsigned int num_tile_cols =3D tile_info->tile_cols; > unsigned int height =3D ALIGN(ctrls->frame->frame_height_minus_1 + 1, 6= 4); > unsigned int height_in_sb =3D height / 64; > unsigned int stripe_num =3D ((height + 8) + 63) / 64;