Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4401551ybl; Mon, 9 Dec 2019 10:12:39 -0800 (PST) X-Google-Smtp-Source: APXvYqyERVxfsawGMj/ks4zW44zDyxXtlSgJ54MhqrIQGu9Q2qolMHFLn0bvOG4Sxpng+2fVPydN X-Received: by 2002:aca:ef85:: with SMTP id n127mr342636oih.54.1575915159142; Mon, 09 Dec 2019 10:12:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575915159; cv=none; d=google.com; s=arc-20160816; b=teXKHRX2X21MgUa5+a55K70zvCT7paDt96fzb72HvUaSy9YBovurhz+r/CYci9y7ik RtY57hrG6a+V9CM7zV40cPu4TQtuyi3TK4/II8hlg2cAVO3TvcxkvRkhj3LiboqcRtXd Tnv/eEvdvyMEfsDDXWOSao/jOmmfkf+Hz3huDcv1kiPWo789vn1mIc7nzCdEOCtPrq3C RtnN4oVC1bHa1STennHwRSHc/MQEdBdKU/p4v5liGHi0pC9TQ8o/BnhuBIHN9DiHHHix h2vG90YO/qj+CaE7Ku1wPyGmIBOSxMMyJjCT1KksT+25ZkJQ42r/xCvqebwtG8hPBy+e Zq/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=3sqiKi9eQLRopkNf50h/TRbALWjuKXK8MWKZ2UglzuE=; b=VW8yvJF/na+qnOIlcupZy17tCtl9K0UlBaIaLUx2OxUjTCue232MRHU0GPm3yg7smx Fj8H54QFNW/NGN5lxPF8YES3GBNM11cAwiZ/WdU9zhJp7G3TonqwGzlTfpg2azX+oCoh qPs/F1AbIqM9KJmfhLugFU6xmg1yl3w6Xs37HKBm26TLitJ01B9c1CoNPnGVlygO/ZIe MKowKWgX9zgj4WDRhxeCsekN2Va+xb8oQQqAC85wNAdBmp4WPlKX+VpP/yT16VDzYrKg NYjl7rjJ3b4cuRg0/meKcFt+HdF52FmGWewEUEU1pic0IFzOm+jrrk7VxI0vnGeTFNRf W7ew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g21si225048otq.134.2019.12.09.10.12.25; Mon, 09 Dec 2019 10:12:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726598AbfLISLv (ORCPT + 99 others); Mon, 9 Dec 2019 13:11:51 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:47960 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726265AbfLISLv (ORCPT ); Mon, 9 Dec 2019 13:11:51 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 12646290491 Message-ID: <7b92111b0c6443653de45f1eeec867645c127f32.camel@collabora.com> Subject: Re: [PATCH v3 2/5] media: hantro: Reduce H264 extra space for motion vectors From: Ezequiel Garcia To: Tomasz Figa , Jonas Karlman Cc: Mauro Carvalho Chehab , Hans Verkuil , Boris Brezillon , Philipp Zabel , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" Date: Mon, 09 Dec 2019 15:11:41 -0300 In-Reply-To: References: <20191106223408.2176-1-jonas@kwiboo.se> Organization: Collabora Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-11-20 at 21:44 +0900, Tomasz Figa wrote: > Hi Jonas, > > On Thu, Nov 7, 2019 at 7:34 AM Jonas Karlman wrote: > > A decoded 8-bit 4:2:0 frame need memory for up to 448 bytes per > > macroblock with additional 32 bytes on multi-core variants. > > > > Memory layout is as follow: > > > > +---------------------------+ > > > Y-plane 256 bytes x MBs | > > +---------------------------+ > > > UV-plane 128 bytes x MBs | > > +---------------------------+ > > > MV buffer 64 bytes x MBs | > > +---------------------------+ > > > MC sync 32 bytes | > > +---------------------------+ > > > > Reduce the extra space allocated now that motion vector buffer offset no > > longer is based on the extra space. > > > > Only allocate extra space for 64 bytes x MBs of motion vector buffer > > and 32 bytes for multi-core sync. > > > > Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding") > > Signed-off-by: Jonas Karlman > > Reviewed-by: Boris Brezillon > > --- > > Changes in v3: > > - add memory layout to code comment (Boris) > > Changes in v2: > > - updated commit message > > --- > > drivers/staging/media/hantro/hantro_v4l2.c | 20 ++++++++++++++++++-- > > 1 file changed, 18 insertions(+), 2 deletions(-) > > > > Thanks for the patch! > > What platform did you test it on and how? Was it tested with IOMMU enabled? Hello Tomasz, Please note that this series has been picked-up and is merged in v5.5-rc1. IIRC, we tested these patches on RK3399 and RK3288 (that means with an IOMMU). I've just ran some more extensive tests on RK3288, on media/master; and I plan to test some more on RK3399 later this week. Do you have any specific concern in mind? Thanks, Ezequiel