From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH 4/9] drm/vc4: Add an API for creating GPU shaders in GEM BOs. Date: Wed, 02 Dec 2015 11:24:38 -0800 Message-ID: <87wpsw8xhl.fsf@eliezer.anholt.net> References: <1449002158-19156-1-git-send-email-eric@anholt.net> <1449002158-19156-4-git-send-email-eric@anholt.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0346591460==" Return-path: 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: Emil Velikov Cc: "Linux-Kernel@Vger. Kernel. Org" , ML dri-devel List-Id: dri-devel@lists.freedesktop.org --===============0346591460== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Emil Velikov writes: > Hi Eric, > > On 1 December 2015 at 20:35, Eric Anholt wrote: >> Since we have no MMU, the kernel needs to validate that the submitted >> shader code won't make any accesses to memory that the user doesn't >> control, which involves banning some operations (general purpose DMA >> writes), and tracking where we need to write out pointers for other >> operations (texture sampling). Once it's validated, we return a GEM >> BO containing the shader, which doesn't allow mapping for write or >> exporting to other subsystems. >> >> Signed-off-by: Eric Anholt >> --- >> drivers/gpu/drm/vc4/Makefile | 3 +- >> drivers/gpu/drm/vc4/vc4_bo.c | 140 ++++++++ >> drivers/gpu/drm/vc4/vc4_drv.c | 9 +- >> drivers/gpu/drm/vc4/vc4_drv.h | 50 +++ >> drivers/gpu/drm/vc4/vc4_qpu_defines.h | 264 +++++++++++++++ > > May I suggest that one 'exports' the header to something like > libdrm_vc4 ? There are patches in flight for nouveau which in similar > fashion, allow userspare to reuse existing api/abi. I'll be putting this header in libdrm for use by Mesa and vc4-gpu-tools. It will still have to live in the kernel as well, though. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJWX0V2AAoJELXWKTbR/J7o0IwP/RvPGRCS8PoSjD3ZuplmIJht zLj8Cp62J3Xhjatq9N9f4r2k1dmnhhW7me//IXtD1LjYTbofTJ38Yor/CyLITYhI zVcbYGAW683OdPHxIRyc7fcvi/i7p9DnFJ24gMExo/uXUEXXKEKmXbBrGNW8Y8Ip l9PUjGyjY5es+JR1JN6Yh9/CQ4NxT3qYvDzE/o4LtkSEsmDucYLSPyZRLeXbiYOe fR0cVUAuWsyANPwr7Vy5xM+K8RhDDj+6z6CLDthXzMCdpRWADP1SRxBvO+Pg5515 ZWIP1lpkEFj+NeuGP0nMPgal8fjpYWKYhHwBWqibBuXZdqDu+TWEVYZeELMKDKNh iewIb0aTM/2ReZoHkp0JR1RQH8O53OXmLt2tgu2qI87GHk1wSXPWXPa84qqbE/r4 /PQTz8AwWJD7225YBl/rRtkwsv3p4I7A3L0l8c4W9N1P2bdQfKKxYbSCB+VRvMZV BLuio6dsEhm8xuMUuQXMYDNso1nihOV7E52PdT/42SJVKBkOrj5Wc8JlG0iYYip2 6/gMZ3fxwzPlhPrb/elh7y+hQpHstW0VmK1q3MB3t9/pz6CIWkygXUX2yCMuVUSr hEUGG3G2xJx8K7e+2Tj4VkonxhKs5fSJH2KnT8kkj9a43C6EG+kP2UsXGVEZdwCJ uc7Zg9GWfU0dQEFx/WjV =AdYX -----END PGP SIGNATURE----- --=-=-=-- --===============0346591460== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============0346591460==--