From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751149AbbLBTYn (ORCPT ); Wed, 2 Dec 2015 14:24:43 -0500 Received: from gabe.freedesktop.org ([131.252.210.177]:57784 "EHLO gabe.freedesktop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750824AbbLBTYm (ORCPT ); Wed, 2 Dec 2015 14:24:42 -0500 From: Eric Anholt To: Emil Velikov Cc: ML dri-devel , "Linux-Kernel\@Vger. Kernel. Org" Subject: Re: [PATCH 4/9] drm/vc4: Add an API for creating GPU shaders in GEM BOs. In-Reply-To: References: <1449002158-19156-1-git-send-email-eric@anholt.net> <1449002158-19156-4-git-send-email-eric@anholt.net> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Wed, 02 Dec 2015 11:24:38 -0800 Message-ID: <87wpsw8xhl.fsf@eliezer.anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= 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----- --=-=-=--