From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH v3 1/2] drm/gem: drm_gem_dumb_map_offset(): reject dma-buf Date: Fri, 18 Aug 2017 10:41:21 -0700 Message-ID: <87mv6wdb9a.fsf@eliezer.anholt.net> References: <1502986891-36764-1-git-send-email-noralf@tronnes.org> <1502986891-36764-2-git-send-email-noralf@tronnes.org> <20170818074656.xawukspyerve6wnb@phenom.ffwll.local> <1de97ff3-44d5-aeac-e03d-4976e455ab67@tronnes.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0985815405==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id D8D276E79C for ; Fri, 18 Aug 2017 17:47:46 +0000 (UTC) In-Reply-To: <1de97ff3-44d5-aeac-e03d-4976e455ab67@tronnes.org> 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?= , Daniel Vetter Cc: narmstrong@baylibre.com, daniel.vetter@ffwll.ch, liviu.dudau@arm.com, dri-devel@lists.freedesktop.org, thierry.reding@gmail.com, laurent.pinchart@ideasonboard.com, daniel.vetter@intel.com, marex@denx.de, boris.brezillon@free-electrons.com, abrodkin@synopsys.com, linux@armlinux.org.uk, z.liuxinliang@hisilicon.com, kong.kongxinwei@hisilicon.com, tomi.valkeinen@ti.com, airlied@redhat.com, puck.chen@hisilicon.com, jsarha@ti.com, vincent.abriou@st.com, alison.wang@freescale.com, sw0312.kim@samsung.com, philippe.cornu@st.com, yannick.fertre@st.com, kyungmin.park@samsung.com, zourongrong@gmail.com, maxime.ripard@free-electrons.com, shawnguo@kernel.org, kraxel@redhat.com List-Id: dri-devel@lists.freedesktop.org --===============0985815405== 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: > (cc affected parties) > > > Den 18.08.2017 09.46, skrev Daniel Vetter: >> On Thu, Aug 17, 2017 at 06:21:30PM +0200, Noralf Tr=C3=B8nnes wrote: >>> Reject mapping an imported dma-buf since is's an invalid use-case. >>> >>> Cc: Philipp Zabel >>> Cc: Laurent Pinchart >>> Cc: Sean Paul >>> Cc: Daniel Vetter >>> Signed-off-by: Noralf Tr=C3=B8nnes >> I think acks from someone using mali would be good too. amdgpu already h= as >> such checks, so I think on the desktop side we're ok. >> >> Acked-by: Daniel Vetter >> >> But I think this one here definitely needs a few more acks. I could break >> uabi if we're unlucky, so let's not rush it. > > Ok, I've CC'ed the affected parties to increase the odds that they look > at this. These are the drivers using drm_gem_dumb_map_offset() > (hopefully I got the list right): If I understand the affected path right, this would break the PL111+VC4 combination: PL111 makes (dumb) buffers for scanout, and VC4 imports them and uses them for rendering. A vc4 glReadPixels of the window system buffer would map it and fail. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlmXJsEACgkQtdYpNtH8 nug+QQ//e391pAEy2IyhAkCF7xXpYsBl/L1Zyn99e/fvDQMyVqm17umC1tNZoiWz faI1TaHNpWwSxEv5+tkvD+I1KTjFdn0JjBWwSTbz6NDM8Zspk1dSuG9DeXuRC8Hc fVJGWwN3ejD9g7v4kYM2dBwIH0Ify2m6hFXCqW3u5wGAIFJkK/kpuF5EgJRn6826 5WMhOt7UqS1BbBemPqT1XR5bvFDWYFfml3md+iL7mjh9fWjqM3nRU0dTsvNdrzG2 1zMpgAQwI6+kGVcdw0z3XyT0ZXMESdNcnX5zsp0xHO6bX+BPqTQ2gzTULpV07vM3 O8kKS80Qn1bN2PX11PoK1LueAiDg+mOzXI9YYqYR6Z4c7OgE+WIWdxdM2tZX0f4n ViwSozPliMa/OAJKBh0oY6ZwHybDRkGouVWhciby3DgOi3qEoVdxoSYwtW+AWJ1m 6IjDAW11+7zusW14J/dr6PhHsiw7VYe3rZj7cvF4FUCjmdamcS8xYbYkiTZVVA8Y iPFhyFOwfnXiajRS2BNfOaUB60+Gc5Cdk+MBwnXstWyfWKJMc/eMq4IQOqleXe2p PhXMzQ0iB1vG+ox191+lM8F/ZTcHPGcz/Y2y5RYA4g2a+EgQF9Vi/JJRSK0Y8AMF DIS1oWIA82fktdAhKYXI1BV+/E4sKvi9Fsga5wdw6mnwpORuMng= =Txfy -----END PGP SIGNATURE----- --=-=-=-- --===============0985815405== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0985815405==--