All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Packard <keithp@keithp.com>
To: Gregory Diamos <Gregory.Diamos@gatech.edu>,
	intel-gfx@lists.freedesktop.org
Subject: Re: CUDA port for intel graphics
Date: Wed, 23 Jun 2010 08:32:42 -0700	[thread overview]
Message-ID: <yunocf1dasl.fsf@aiko.keithp.com> (raw)
In-Reply-To: <4C21B45F.8040204@mail.gatech.edu>


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

On Wed, 23 Jun 2010 00:14:39 -0700, Gregory Diamos <Gregory.Diamos@gatech.edu> wrote:

> 1. Is there an interface for writing directly to the GPU ring buffer 
> that is exposed by the driver?  If not, would it be straightforward to 
> add such an interface?

Take a look at 'drm' in the mesa git repository; that contains a library
(libdrm) which provides to ability to execute arbitrary commands in the
GPU with in-kernel memory management. This is used by the X 2D driver,
the Mesa GL driver and the VaAPI library.

    git clone git://anongit.freedesktop.org/git/mesa/drm

> 2. Are there any restrictions (security, DRM, etc) for loading/executing 
> binaries on the media pipeline?

Nope. You need permission to open the device, which is currently managed
by having a connection to the X server, so for now you'd have to be
running under X. There's no requirement to deal with X other than
authenticating access to the device though. It would be useful to
fix this so that arbitrary programs could use the GPU without needing to
be authenticated through the window system.

> 3. How modular is the driver?  Is there an interface for user-level 
> applications to issue hardware commands in a way that is isolated and
> time-shared with commands from the graphics driver?  If not, would it be 
> straightforward to modify the driver to disable the graphics components 
> of the driver and retain only an interface for passing commands to the 
> device?

Yes, that's precisely what the DRM infrastructure provides -- the ability
to execute arbitrary commands on the hardware from multiple programs at
the same time.

> 4. How is memory sharing between the CPU and GPU handled? Is it possible 
> to map memory from the CPU's address space into the GPU's address space? 
>   Sorry if this is already documented somewhere, I might have missed
> it.

As above, the kernel is used to manage memory objects and the driver
knows how to deal with the lack of hardware cache coherency with help
From the application.

-- 
keith.packard@intel.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 189 bytes --]

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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

      parent reply	other threads:[~2010-06-23 15:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-23  7:14 CUDA port for intel graphics Gregory Diamos
2010-06-23  8:40 ` Chris Wilson
2010-06-23 15:32 ` Keith Packard [this message]

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=yunocf1dasl.fsf@aiko.keithp.com \
    --to=keithp@keithp.com \
    --cc=Gregory.Diamos@gatech.edu \
    --cc=intel-gfx@lists.freedesktop.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.