From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: drm: Why shmem? Date: Mon, 28 Aug 2017 13:40:41 -0700 Message-ID: <87wp5n5sty.fsf@anholt.net> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0306240693==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id 883276E0AA for ; Mon, 28 Aug 2017 20:45:07 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Noralf =?utf-8?Q?Tr=C3=B8nnes?= , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0306240693== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Noralf Tr=C3=B8nnes writes: > Hi, > > Currently I'm using the cma library with tinydrm because it was so > simple to use even though I have to work around the fact that reads are > uncached. A bigger problem that I have become aware of, is that it > restricts the dma buffers it can import since they have to be continous. > > So I looked to udl and it uses shmem. Fine, let's make a shmem gem > library similar to the cma library. > > Now I have done so and have started to think about the DOC: section, > explaining what the library does. And I'm stuck, what's the benefit of > using shmem compared to just using alloc_page()? Using shmem means that, when the buffer isn't pinned for DMA usage by the device, the pages can be swapped out. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlmkf8kACgkQtdYpNtH8 nuibtRAAk7eEnd5l2wIvkkqkt4GIidYSbXALt5PUlWbZYitH9tzTsKSMcW6df/E6 1DOxulQJvahHqMKupgjsol8sM5KC7YUGNSgMQv7wm3kKiV5O6HVTLZYuRsOhqiQd 0aHJlB8Zktn1ZR5w/+T3CeYzJ0R0fOn6LPOnBK9xBo8HTfySrrUYvqTHvI2uvxOq 4lNeuSl/j0N/csbN8OHb++rHw3KP6QbaB+a/DUZK7sCVBkUjCbGPqPDhhTBBRTdu VVzIluWNOuxSEjXFHd6UctxtHQZZMovjoc7Zy1VLUJGNvDR8XKg9QlhfvXoqu3Qf qUJ/JwOKOnk6iRFm2TX0KSi3uImdujcLoMhQDC/Arg7UrPq2N8lwN8ErHxhSTdWz Nf7bxKuMe4Fi7dtoHir4U4UBNAKpb/PLGy24yKTtqc3cnPrK5+QPVuPmigYngow8 Ji+rdbKAFKWUqFsuuL5XOe/pQk/s5V3Krmn7jR7VjWmr+HxNEDFmdJ1s2NGQ0hk4 RX4OaFUumJMCm1Mue1IKzHG9fIOz4yebz4377BixxuWU45FIHRiX8t2utGa2A2mB cbZjEKYR7QpS13bREvabJ5Y2uzKsy8AWv39uIVKOSggnFE9XBvxEB8ozgf7aSsEn HLayVDMQ9GIJhJIvQSWfIjzML7LS5OjxIkFxMCz/ooxAqdCXoUo= =J8tu -----END PGP SIGNATURE----- --=-=-=-- --===============0306240693== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0306240693==--