Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6935552ybi; Thu, 1 Aug 2019 00:36:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxynAV9nblW6hBL6k/AP+STtsCP/CFVnSAWA1oD3cHgb3bB9CDO2smGsyPBbpFEGQXiQ251 X-Received: by 2002:a17:902:848b:: with SMTP id c11mr123795626plo.217.1564645018207; Thu, 01 Aug 2019 00:36:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564645018; cv=none; d=google.com; s=arc-20160816; b=SUy6ygz7qA+2/IiVjSamdhpb9hfKLu77cHGmBQ276f6Z8TjvUsLA4qI6Sdi0c/eRCA FjCcghqZlI/LwV5aK+nm1np/hP3KiiNDPMy4bu3U8O8E3yt7ipnEAwsjX6grMHC68W8y VNW+MF7QGMfS1jzsPVOvW3EzxCgBgupJLMdJ5BSBYeRBc19+o7Sed90OGrsOk+JaQKUO gEkzC9fs0meVU2jv3O7f+YL3xrvwnRwCUBls41zReRrUA4vE8+c0JKONGIPPM4RX4l// CZZVeVaCMvFB+pjq+ujoTcE/29YcJ3gK2awwCI+8Qqwnoz2zAiGUKDfjbDNMppcS4DZY Kn3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=KWgTIDUaXWyQhxe8zr8OFqyeUTn4RbPu0dpIgAvAOAA=; b=NDfFqd8jkY6cVGNl8wPI7D4iTT0E2Jcr/0/WWF8+OcENUnS5c33x22o0o3f6x2F2lX JyttoBh2Yeo0grG7GfGc9ZfsC8Ay+LdjGIr/tNzci1YvpHfgTVVcao68CJbWcjQyitCf uKZk5dff0UmobQ8EwT1zy3oCPNfr29O+L6gjId8WhmuWOGhH7JdHSng67ShWIma9nVJT jfKmnofxP5do/7qyLGTPKTduDonzsmvNotDOOeRrU1LB4kcPpT66kqY0UWraoaCIP4vI OeuUprPqo/9AJ+WBqzjiJ3kpmQkRqkzQGXb2o49ycHdKAFqkSBLkBqauIJ900yhx2lP2 bDqA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 10si2463605pgp.78.2019.08.01.00.36.43; Thu, 01 Aug 2019 00:36:58 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726794AbfHAHEP (ORCPT + 99 others); Thu, 1 Aug 2019 03:04:15 -0400 Received: from relay11.mail.gandi.net ([217.70.178.231]:36113 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725379AbfHAHEP (ORCPT ); Thu, 1 Aug 2019 03:04:15 -0400 Received: from aptenodytes (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 583F4100012; Thu, 1 Aug 2019 07:04:10 +0000 (UTC) Date: Thu, 1 Aug 2019 09:04:10 +0200 From: Paul Kocialkowski To: Tomasz Figa Cc: Boris Brezillon , Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Sakari Ailus , Linux Media Mailing List , Linux Kernel Mailing List , Nicolas Dufresne , kernel@collabora.com, Ezequiel Garcia , Jonas Karlman , "open list:ARM/Rockchip SoC..." , Heiko Stuebner , Andrew Morton , Rasmus Villemoes , Philipp Zabel , Hertz Wong Subject: Re: [PATCH 7/9] media: hantro: Add core bits to support H264 decoding Message-ID: <20190801070410.GA22382@aptenodytes> References: <20190619121540.29320-1-boris.brezillon@collabora.com> <20190619121540.29320-8-boris.brezillon@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gKMricLos+KVdGMg" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gKMricLos+KVdGMg Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu 01 Aug 19, 13:06, Tomasz Figa wrote: > Hi Boris, >=20 > On Wed, Jun 19, 2019 at 9:15 PM Boris Brezillon > wrote: > [snip] > > @@ -533,10 +535,21 @@ hantro_queue_setup(struct vb2_queue *vq, unsigned= int *num_buffers, > > return -EINVAL; > > } > > > > + /* The H264 decoder needs extra size on the output buffer. */ > > + if (ctx->vpu_src_fmt->fourcc =3D=3D V4L2_PIX_FMT_H264_SLICE_RAW) > > + extra_size0 =3D 128 * DIV_ROUND_UP(pixfmt->width, 16) * > > + DIV_ROUND_UP(pixfmt->height, 16); > > + >=20 > I wonder if this shouldn't be accounted for already in the sizeimage > returned by TRY_/S_FMT, so that the application can know the required > buffer size if it uses some external allocator and DMABUF memory type. > I know we had it like this in our downstream code, but it wasn't the > problem because we use minigbm, where we explicitly add the same > padding in the rockchip backend. Any thoughts? Does the extra size have to be allocated along with the buffer? On cedrus, we have a need for a similar side-buffer but give it a dedicated= CMA allocation, which should allow dma-buf-imported buffers. Cheers, Paul --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --gKMricLos+KVdGMg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAl1CjukACgkQ3cLmz3+f v9E6+wf+OYHawgm5Z7vHIOssrL6TF8ZV3xNsgqTT2Je54KLFCRbarBvD2HyB8nFc pSPCrxiELvO1Tio+KYCoYz2Xve0PlzdxiBq1zbEYnzb8k95YbZnOMb2Vj90ZLPNm FPpXE5VrVih6v5T3qgtqBNjaYRHOHLztiWoHRbRshiWxEPvzreD/Hfyawe4LbsJ6 dnzSPh8DvV46LsjnYe4rskINbfEkxEk7VtBynQ9CucYaZ2O8xXKYVQk5D/XkNhtm 48LgrQQJ2QrZH6Qed+We9pqBhOUH/in49PdD+UGN054dLBHT86nVc+0dbfJQW87N jwHDYAmZKitBd74E4nNs5DQeWXCfig== =h/ad -----END PGP SIGNATURE----- --gKMricLos+KVdGMg--