From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3F05C43603 for ; Mon, 9 Dec 2019 18:11:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 88D07208C3 for ; Mon, 9 Dec 2019 18:11:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726637AbfLISLv (ORCPT ); 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