From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [Intel-gfx] [PATCH v5 4/5] drm: Add library for shmem backed GEM objects Date: Wed, 28 Nov 2018 13:52:56 -0800 Message-ID: <87mupseuo7.fsf@anholt.net> References: <20181017130454.44292-1-noralf@tronnes.org> <20181017130454.44292-5-noralf@tronnes.org> <87k1kzgxve.fsf@anholt.net> <20181127085850.GX4266@phenom.ffwll.local> <87lg5es1bf.fsf@anholt.net> <20181128082251.GI4266@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1555099200==" Return-path: In-Reply-To: <20181128082251.GI4266@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter Cc: david@lechnology.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, sam@ravnborg.org List-Id: dri-devel@lists.freedesktop.org --===============1555099200== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Daniel Vetter writes: > On Tue, Nov 27, 2018 at 12:38:44PM -0800, Eric Anholt wrote: >> Daniel Vetter writes: >>=20 >> > On Mon, Nov 26, 2018 at 04:36:21PM -0800, Eric Anholt wrote: >> >> Noralf Tr=C3=B8nnes writes: >> >> > +static void drm_gem_shmem_vm_close(struct vm_area_struct *vma) >> >> > +{ >> >> > + struct drm_gem_object *obj =3D vma->vm_private_data; >> >> > + struct drm_gem_shmem_object *shmem =3D to_drm_gem_shmem_obj(obj); >> >> > + >> >> > + drm_gem_shmem_put_pages(shmem); >> >> > + drm_gem_vm_close(vma); >> >> > +} >> >> > + >> >> > +const struct vm_operations_struct drm_gem_shmem_vm_ops =3D { >> >> > + .fault =3D drm_gem_shmem_fault, >> >> > + .open =3D drm_gem_vm_open, >> >> > + .close =3D drm_gem_shmem_vm_close, >> >> > +}; >> >> > +EXPORT_SYMBOL_GPL(drm_gem_shmem_vm_ops); >> >>=20 >> >> I just saw a warning from drm_gem_shmem_put_pages() for >> >> !shmem->pages_use_count -- I think drm_gem_vm_open() needs to >> >> drm_gem_shmem_get_pages(). >> > >> > Yeah we need a drm_gem_shmem_vm_open here. >>=20 >> Adding one of those fixed my refcounting issues, so I've sent out a v6 >> with it. > > Just realized that I've reviewed this patch already, spotted that vma > management issue there too. Plus a pile of other things. From reading that > other thread discussion with Noralf concluded with "not yet ready for > prime time" unfortunately :-/ I saw stuff about how it wasn't usable for SPI because SPI does weird things with DMA mapping. Was there something else? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlv/DjgACgkQtdYpNtH8 nuglYA/5AfTohgMUyfHHpPOSHM9iZlMRVtzNydq0oEggN5CnIuKf00n+KaAjJta6 YCC4k9mTb2Yy7DpW+SblALbzRR4+Gn7pWAyI31EcV9nNhGK66EiUBFz9fMwUlDp3 YbWnU+bw26WJNbFUpzwtyYYLnNrgOa25bi3f+jWnjUHlXZT12xgelwyaRPhwF5MV +2zrVJNOUuarexiQA3uYFHNm68g4VN53QoDWvCiefgd54op324SBN0mCF57FrZqx zeyBnR4xhBFQCGmrt1lUWxzCvvy7ZRp9pix5EOFC6XpPrFC99UWRPiWJLQI5CraP FIkhk+niyz6L3nP5HwYE4DOcH5/ZcPqR/jj+qOqcNJkJkst+zpK3102qs0oqyXjm zmstLj/kMXaxnXPkkPajgHyFqKrAq69MPjgoSoqOIl1gLFXiI/mY1va5vwWOHGUw dbFsybgrqfzPI3+BWGkd5Pou1ekiLAFkQRRdU17pEEqJHkCdEHFD5Gp/Wkh21AJi 6h43WofuoWTsMzfZnjmPRDOSYFS5ia+evyJR8ygrAr9BJWv4x+T1uQMEQOK7bJEz hjyNF/w73Oj6ZnhBfnuSSX3fXkWU+KPe3P2JWyoTb3ypxssmad43UNDk0GaKX1K0 XQzFR0CQwAXpX2yOKj5MeMG5l53tbhGUfjbv/XRbeNWmtPf7XgU= =b5Gb -----END PGP SIGNATURE----- --=-=-=-- --===============1555099200== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1555099200==--