Received: by 10.192.165.148 with SMTP id m20csp546821imm; Fri, 4 May 2018 02:16:27 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoOxq4jevCnWzF9BDZoFKVEp6TXzgp257rxCbGMm/Tx53ctcB6I0DyJNDAkd7ELfT/4Y/ET X-Received: by 2002:a63:7e58:: with SMTP id o24-v6mr22316049pgn.325.1525425387317; Fri, 04 May 2018 02:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525425387; cv=none; d=google.com; s=arc-20160816; b=OA0l44WTUl3/o4pyh8CRORQCY+qj0VGDfopZZTQo5l8gB4/sx1txQ3QlY28M7AsaBi MS6YdqWq49gvsD180k2BlCw0dnHCAvJRNE6wLw8MryOvl6I+shDUR3keabb3+hW3CBcf zJg3ZQ12xseetxhQuHKUtBDR9U4859mLLdXq6W/idgLF88F6Nqv5rBFFb390AExnS0XP 2Ukhn3Xb3tYGCKcedbApJdTPZy6zacgSaUM7rw0UwUOaVEDa0EoVm9XLPb1RK/KHVijp X9si+2N2DH34tR+pbfhxqzOuenwmVFJvIrrgY/M0zEjMpQNUpxN1QNpqZm6aQup5tn0J O98Q== 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:arc-authentication-results; bh=eHh9TosTALzIxmOJm0QxM247+VHTFV/Okz1OqGOj/3s=; b=pMFj4TBBltyPyVezZrFdGWpw7/Kx8cDVPqvk8jAmbFWE3/vEm+sXsnvXryXs9yHBKA 0126vJEigArbpLx+9a00VWmd4/wALLzscbGef7g+l6s2VAmKEDCJw8RV5AwWTB0QSufB GmB6oDidnQXHvn/0qelwbxseXds580YUhAcZmPABo94XY8tFmH6Nnbb8rrpYEfZqZ98N 3xoJOWh+MpkhKSX2hc5JiaaTDEdlL5RQ7IptylD/RnBeKilVd5kSf5rz9aOCXzpl6BlE j55eKVDCzRovDC/juA4T3+ta3r2oTpMhtyg3CNaMQSUEMk6Zn3x1Y9WDtRmhLAC8T62N 6tow== 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 h185si15488936pfe.332.2018.05.04.02.16.12; Fri, 04 May 2018 02:16:27 -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 S1751663AbeEDJP7 (ORCPT + 99 others); Fri, 4 May 2018 05:15:59 -0400 Received: from mail.bootlin.com ([62.4.15.54]:53941 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751001AbeEDJP5 (ORCPT ); Fri, 4 May 2018 05:15:57 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 0CC5B2072F; Fri, 4 May 2018 11:15:55 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id CAE8520376; Fri, 4 May 2018 11:15:54 +0200 (CEST) Date: Fri, 4 May 2018 11:15:55 +0200 From: Maxime Ripard To: Paul Kocialkowski Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Mauro Carvalho Chehab , Rob Herring , Mark Rutland , Chen-Yu Tsai , Pawel Osciak , Marek Szyprowski , Kyungmin Park , Hans Verkuil , Sakari Ailus , Philipp Zabel , Arnd Bergmann , Alexandre Courbot , Tomasz Figa Subject: Re: [PATCH v2 09/10] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes Message-ID: <20180504091555.idgtzey53lozj2uh@flea> References: <20180419154124.17512-1-paul.kocialkowski@bootlin.com> <20180419154536.17846-5-paul.kocialkowski@bootlin.com> <20180420073908.nkcbsdxibnzkqski@flea> <82057e2f734137a3902d9313c228b01ceb345ee7.camel@bootlin.com> <20180504084008.h6p4brari3xrbv6l@flea> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lg266mocsnmqmuk4" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180323 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --lg266mocsnmqmuk4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, May 04, 2018 at 10:47:44AM +0200, Paul Kocialkowski wrote: > > > > > + reg =3D <0x01c0e000 0x1000>; > > > > > + memory-region =3D <&ve_memory>; > > > >=20 > > > > Since you made the CMA region the default one, you don't need to > > > > tie > > > > it to that device in particular (and you can drop it being > > > > mandatory > > > > from your binding as well). > > >=20 > > > What if another driver (or the system) claims memory from that zone > > > and > > > that the reserved memory ends up not being available for the VPU > > > anymore? > > >=20 > > > Acccording to the reserved-memory documentation, the reusable > > > property > > > (that we need for dmabuf) puts a limitation that the device driver > > > owning the region must be able to reclaim it back. > > >=20 > > > How does that work out if the CMA region is not tied to a driver in > > > particular? > >=20 > > I'm not sure to get what you're saying. You have the property > > linux,cma-default in your reserved region, so the behaviour you > > described is what you explicitly asked for. >=20 > My point is that I don't see how the driver can claim back (part of) the > reserved area if the area is not explicitly attached to it. >=20 > Or is that mechanism made in a way that all drivers wishing to use the > reserved memory area can claim it back from the system, but there is no > priority (other than first-come first-served) for which drivers claims > it back in case two want to use the same reserved region (in a scenario > where there isn't enough memory to allow both drivers)? This is indeed what happens. Reusable is to let the system use the reserved memory for things like caches that can easily be dropped when a driver wants to use the memory in that reserved area. Once that memory has been allocated, there's no claiming back, unless that memory segment was freed of course. Maxime --=20 Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com --lg266mocsnmqmuk4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlrsJMoACgkQ0rTAlCFN r3TOlw//aE2dU8svsZ2NIWYkNcyDnOnF0RDi5zxBPpErhmSWmQeJv5JTmvQrRrCn q+o195rcU613Rx1KgLr2rmR8GyP2NP7I+sTRwA7T297ycU3grJrhRXuSDu8g7ZzK vQPWw/3A6m3SxX3WMm3FHjrizU78V2Jr4N5VFfwgOwS30W9vL7UKxjiIQm1cqHut gUuklM45Mj0i2bHesS9uU3YX/z7nlAkhy16wup9RSbyCuPfKqFmLyL6sB7CJztEP ygw5CEOAZAUYcoVWLWQYKoFDn4/MfOmYyKc7448g5qnSToS7nC2nS9gmuY9OjLYY 9vOP+wwCGFIAu9ikytpvRsDUQYYxwuRUxenlSRAN/TeNOlYZDHy50sT3UDklVG7G 6pfyAm/OMDNWzT7vipCPcUenUOvQGLRsPqyhbAwEtBCc1bton20Z09UNFtfJIGs4 Sxw4+agcrF3I1YsrL8e91oVCUqMMVcehoIkARHyuVwQuE02fA1qpE1sUvVM4T9ES HCmzW/KTXNRKBrzRYt5SsiS2O/v3Wem3af/kVarPXugmgpolkL7cMwRRr/A6IrnH j+NvpT3lXIe277Ox69YhXOMxOzLZ68JYD4AcNO1WIubD24ROi7Po4L3j83yEO5gP nNPSt8CI7AxobNwNWm9KnUflJS41KH3KBVOuIk0H0LZn1ucWhoI= =o/bZ -----END PGP SIGNATURE----- --lg266mocsnmqmuk4--