All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Anholt <eric@anholt.net>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: ML dri-devel <dri-devel@lists.freedesktop.org>,
	"Linux-Kernel\@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>
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	[thread overview]
Message-ID: <87wpsw8xhl.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <CACvgo501925ZkY_e3ryJv5kT9Es5sm45qmhcDdSeAfO3bDj8aw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]

Emil Velikov <emil.l.velikov@gmail.com> writes:

> Hi Eric,
>
> On 1 December 2015 at 20:35, Eric Anholt <eric@anholt.net> 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 <eric@anholt.net>
>> ---
>>  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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Eric Anholt <eric@anholt.net>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: "Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>,
	ML dri-devel <dri-devel@lists.freedesktop.org>
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	[thread overview]
Message-ID: <87wpsw8xhl.fsf@eliezer.anholt.net> (raw)
In-Reply-To: <CACvgo501925ZkY_e3ryJv5kT9Es5sm45qmhcDdSeAfO3bDj8aw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1275 bytes --]

Emil Velikov <emil.l.velikov@gmail.com> writes:

> Hi Eric,
>
> On 1 December 2015 at 20:35, Eric Anholt <eric@anholt.net> 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 <eric@anholt.net>
>> ---
>>  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.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-12-02 19:24 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 20:35 [PATCH 1/9] drm: Create a driver hook for allocating GEM object structs Eric Anholt
2015-12-01 20:35 ` Eric Anholt
2015-12-01 20:35 ` [PATCH 2/9] drm/vc4: Add a BO cache Eric Anholt
2015-12-01 20:35   ` Eric Anholt
2015-12-01 20:35 ` [PATCH 3/9] drm/vc4: Add create and map BO ioctls Eric Anholt
2015-12-01 20:35   ` Eric Anholt
2015-12-04 14:29   ` Emil Velikov
2015-12-04 14:29     ` Emil Velikov
2015-12-08  1:16     ` Eric Anholt
2015-12-08  1:16       ` Eric Anholt
2015-12-08  2:56       ` Michel Dänzer
2015-12-08  2:56         ` Michel Dänzer
2015-12-08  4:05         ` Eric Anholt
2015-12-08  4:05           ` Eric Anholt
2015-12-01 20:35 ` [PATCH 4/9] drm/vc4: Add an API for creating GPU shaders in GEM BOs Eric Anholt
2015-12-01 20:35   ` Eric Anholt
2015-12-02 11:35   ` Emil Velikov
2015-12-02 11:35     ` Emil Velikov
2015-12-02 19:24     ` Eric Anholt [this message]
2015-12-02 19:24       ` Eric Anholt
2015-12-01 20:35 ` [PATCH 5/9] drm/vc4: Fix a typo in a V3D debug register Eric Anholt
2015-12-01 20:35   ` Eric Anholt
2015-12-01 20:35 ` [PATCH 6/9] drm/vc4: Bind and initialize the V3D engine Eric Anholt
2015-12-01 20:35   ` Eric Anholt
2015-12-01 20:35 ` [PATCH 7/9] drm/vc4: Add support for drawing 3D frames Eric Anholt
2015-12-01 20:35   ` Eric Anholt
2015-12-02 11:29   ` Emil Velikov
2015-12-02 11:29     ` Emil Velikov
2015-12-02 19:27     ` Eric Anholt
2015-12-02 19:27       ` Eric Anholt
2015-12-01 20:35 ` [PATCH 8/9] drm/vc4: Add support for async pageflips Eric Anholt
2015-12-01 20:35   ` Eric Anholt
2015-12-02 14:05   ` Daniel Stone
2015-12-02 14:05     ` Daniel Stone
2015-12-04  1:42     ` Eric Anholt
2015-12-04  1:42       ` Eric Anholt
2015-12-07 10:13       ` Daniel Stone
2015-12-07 10:13         ` Daniel Stone
2015-12-01 20:35 ` [PATCH 9/9] drm/vc4: Add an interface for capturing the GPU state after a hang Eric Anholt
2015-12-01 20:35   ` Eric Anholt
2015-12-02 11:45   ` Emil Velikov
2015-12-02 11:45     ` Emil Velikov
2015-12-02 19:35     ` Eric Anholt
2015-12-02 19:35       ` Eric Anholt
2015-12-02 22:26       ` Daniel Vetter
2015-12-02 22:26         ` Daniel Vetter
2015-12-02 22:58         ` Daniel Stone
2015-12-03 11:55           ` Emil Velikov
2015-12-03 11:55             ` Emil Velikov
2015-12-03 11:46       ` Emil Velikov
2015-12-03 11:46         ` Emil Velikov
2015-12-02  8:58 ` [PATCH 1/9] drm: Create a driver hook for allocating GEM object structs Daniel Vetter
2015-12-02  8:58   ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wpsw8xhl.fsf@eliezer.anholt.net \
    --to=eric@anholt.net \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.