Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1433111lqh; Mon, 6 May 2024 07:38:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXhEywV0hI+9K1LyRKbD1OSqsQXz9JC2F8RITuOXKHrl6uYrVY+fmCrORLdXynhMwN4fuJS9zWKvAlWeOkUX4II8yApHaaTp2CfP6mfCw== X-Google-Smtp-Source: AGHT+IHlOAh3hb2hb7GMo8YqfvNpGJZDK62x+41iQrvD1QroliikUM2iRaqDrWU1gxxaby5l6bxP X-Received: by 2002:a05:6870:9729:b0:239:18d8:1519 with SMTP id n41-20020a056870972900b0023918d81519mr12385723oaq.46.1715006332978; Mon, 06 May 2024 07:38:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715006332; cv=pass; d=google.com; s=arc-20160816; b=gUs7OWqqT0Pdoz7zm0dwub6aAlCaQTiI9w3ZIVpm6MpVTFlUKSgrdiA4ya4WjoDY7h t2Xq/I5EZrU5VXRoSjZNHGJ6bCJ0s0yDtgDVbx9RA/KEuTStYhjgv5Nj2bal8ku0gozA JOHYfFFPhhFmopDrQg/+0/NeqB44uaKxeddtrpTZqpryJZbaaMgtVZh9D9L56kbncJ+h y9D0dgGQsTwGPwEiIE9syaMt3X3mkpU7T+vkXR4XhjSgT2C8jFFOgJnSR7wgaz0//82r RZMipnoZtPwQFdp5n/fZDRGFYA/2uehHafkR3P4FB14nDKyYzPGPGLkHX7ZOpDCa4MVA tOTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=T7fsJMkPNUS3sjTSAyJOzTO2e+Aoe0Aq9mz0jdj7Bag=; fh=UPC5dlrADZ2M5Ot579gkH35zhRDpeGkIec33WbYo3Gg=; b=FY4iIHWgx1lrvk3vptFKuNE7cEzxnenaq/Dt61A2X5JBdnat1Wa73CIMoakxESvgvY 8fzCWVzcx3wzHtyDZPTZEKPYFdS3eFdz8HjtxJTUZUQV/XNRF/3SE/PbzIlXNjItlLt6 0nICNdVEnzidRbbr305YKUwftUQeY/n5ddXtaSl6VFwKT2lwXsXv43ImU3yRp9zX01Dz zdeyipLMZRY+qNThjjARJ1Gw6+z0oWshDx0HrC1ZoMUtBAt0VuKHcObQ2+SI/gD5v92J 7c1KqvVoGNi+CB3oREROjsbehlq5KPtuF040S9A67kUvzS9BwrGrbH33Z8Ce0k0UfqvJ WfPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="FLCl/YV3"; 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-169999-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169999-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 qr10-20020a05620a390a00b0078edf8b7ec7si10191022qkn.747.2024.05.06.07.38.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 07:38:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169999-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="FLCl/YV3"; 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-169999-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169999-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 B00531C218EF for ; Mon, 6 May 2024 14:38:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CEB7153560; Mon, 6 May 2024 14:38:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="FLCl/YV3" 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 254B5152E19; Mon, 6 May 2024 14:38:37 +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=1715006319; cv=none; b=e/kw+f2x7kZQUUkkvxIfsOnvjndCITSCg5GmU5QEI/ezqVwgvm6IcVDUEFWzjpBeeCrjoG2COhnZ7O31Xl/GAbutWlfxMZCrLPnyfozmCqTKxGk+TzU28MdRUkePrjuh40yvnPnoeW7GH/c4bMrYpXcTLfOCWL/f8z2ENVeQMz8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715006319; c=relaxed/simple; bh=KGPDfZwI4ubFEcvrrWnuUTNMJQCXV8Ilj2eLN3CMFYk=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=TRjnL7VxohJLzfq+VCQtLiPi/rrPYtrVERfXWFD3xz8Wa70KdyLoS4caPsR3NwESPwFE146389cCe+UeKKQyjp53zlms3448G8eBeRi/acLFShmgzHJSOy+8jtLzatejeidalMGZYz3pXrJvQjtWTes19ZcIssnsM1nyABPigL8= 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=FLCl/YV3; 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=1715006316; bh=KGPDfZwI4ubFEcvrrWnuUTNMJQCXV8Ilj2eLN3CMFYk=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=FLCl/YV3TJSICHUDZL5pxebArkcfqWznV0LA/FTCX5sNREJSSLO+gHG07AcCkfvdT 0gmBg4LSzEFFoKzCVkPbvoqQhCn0x4nwpYtW5jUET+ib7no9Lfb8ZBjosbe08r+Z9P u2jBplgHw9tqT8Rv2O6HpGlmrrbRHqt/cYnnBlBtvqCgegZsH+JbqvYhW2icaAS+nh bS3YheixnaWj3WY1SGzkuoR6ZN0VchuaBnY3VWEIXJtP1pCbyPUUWFjNFM37cZsLHl szq8g7lx9zv3fJdwBjJsg7AUyEj9BhB/mWbaoi1r9QUUgcNvnX6FhZSwEszzRVjgpk 3Wa9VzavpqEVw== Received: from [100.93.89.217] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 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 BC0FA3781107; Mon, 6 May 2024 14:38:35 +0000 (UTC) Message-ID: <3dde932a-1b62-4824-a9e0-722f82faaaa6@collabora.com> Date: Mon, 6 May 2024 16:38:35 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] media: verisilicon: Fix auxiliary buffers allocation size From: Benjamin Gaignard To: Nicolas Dufresne , 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 References: <20240328093439.18712-1-benjamin.gaignard@collabora.com> <20240328093439.18712-2-benjamin.gaignard@collabora.com> <2a3b897a-71f7-4a94-a13c-1aa8b2d96e78@collabora.com> Content-Language: en-US In-Reply-To: <2a3b897a-71f7-4a94-a13c-1aa8b2d96e78@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 05/04/2024 à 10:13, Benjamin Gaignard a écrit : > > Le 04/04/2024 à 20:00, Nicolas Dufresne a écrit : >> Hi, >> >> Le jeudi 28 mars 2024 à 10:34 +0100, Benjamin Gaignard a écrit : >>> 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. >> Seems like this is potentially going to impact some conformance >> tests. Anything >> to report from fluster results ? > > Flusters AV1 score is the same. > Maybe we have been lucky when allocating memory until now. > That said the test stream have 8 tile columns which is unusual but > admitted by AV1 specifications. Gentle ping, Regards, Benjamin > > Benjamin > >> >> Nicolas >> >>> 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; >>