dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jerome Glisse <j.glisse@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>,
	Jerome Glisse <jglisse@redhat.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/radeon: GPU virtual memory support v22
Date: Mon, 9 Jan 2012 09:31:16 +0100	[thread overview]
Message-ID: <20120109083116.GB3723@phenom.ffwll.local> (raw)
In-Reply-To: <CAH3drwZBzUdEN=xjg7GWwwE-L318dZLcnqJXiT8VO+Y_C3MFdA@mail.gmail.com>

On Sun, Jan 08, 2012 at 05:56:31PM -0500, Jerome Glisse wrote:
> On Sun, Jan 8, 2012 at 9:05 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> > Hi all,
> >
> > Meh, I've wanted to port the small set of helpers nouveau already has to
> > handle per open fd gpu virtual address spaces to core drm, so that I could
> > reuse them for i915. Just to go one small step towards unifying drivers in
> > drm/* a bit ...
> >
> > Looks like I'll have another driver to wrestle or just forget about it and
> > reinvet that wheel for i915, too.
> >
> > </slight rant>
> >
> > Cheers, Daniel
> > --
> 
> I looked at nouveau before writing this code, thing is, in the end
> there is little common code especialy when you take different path on
> how you handle things (persistent or dynamic page table for instance).
> Thought couple things can still be share. Note that the whole radeon
> code is designed with the possibility of having several address space
> per process, thought there is no use for such things today we believe
> things like opencl+opengl can benefit of each having their own address
> space.

- I've realized when looking through nouveau that we likely can't share
  match more than a gem_bo->vma lookup plus a bunch of helper functions.

- Imo having more than one gpu virtual address space per fd doesn't make
  much sense. libdrm (at least for i915) is mostly just about issueing
  cmdbuffers. Hence it's probably easier to just open two fds and
  instantiate two libdrm buffer managers if you want two address spaces
  for otherwise you have to teach libdrm that the same buffer object still
  can have different addresses (which is pretty much against the point of
  gpu virtual address spaces).

I also realize that in the dri1 days there's been way too much common code
that only gets used by one or two drivers and hence isn't really commonly
useable at all (and also not really of decent quality). So I'm all in
favour for driver-specific stuff, especially for execution and memory
management. But:

- nouveau already has gpu virtual address spaces, radeon just grew them
  with this patch and i915 is on track to get them, too: Patches to enable
  the different hw addressing mode for Sandybridge and later are ready,
  and with Ivybridge hw engineers kinked out the remaining bugs so we can
  actually context-switch between different address spaces without hitting
  hw bugs.

- The more general picture is that with the advent of more general-purpose
  apis and usecases for gpus like opencl (or also background video
  encoding/decoding/transcoding with libva) users will want to control gpu
  resources. So I expect that we'll grow resource limits, schedulers with
  priorities and maybe also something like control groups in a few years.
  But if we don't put a bit of thought into the commonalities of things
  like gpu virtual address spaces, scheduling and similar things I fear we
  won't be able to create a sensible common interface to allocate and
  control resources in the feature. Which will result in a sub-par
  experience. 

But if my google-fu doesn't fail me gpu address spaces for radeon was
posted the first time as v22 ever on a public list and merged right away,
so there's been simply no time to discuss cross-driver issues.  Which is
part of why I'm slightly miffed ;-)

Cheers, Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

  reply	other threads:[~2012-01-09  8:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-06  3:11 [PATCH 1/3] drm/radeon: GPU virtual memory support v22 alexdeucher
2012-01-06  3:11 ` [PATCH 2/3] drm/radeon/kms: Add support for multi-ring sync in CS ioctl (v2) alexdeucher
2012-01-06  3:11 ` [PATCH 3/3] drm/radeon/kms: sync across multiple rings when doing bo moves v3 alexdeucher
2012-01-06 10:09 ` [PATCH 1/3] drm/radeon: GPU virtual memory support v22 Dave Airlie
2012-01-06 14:13   ` Alex Deucher
2012-01-06 12:53 ` Christian König
2012-01-06 14:12   ` Alex Deucher
2012-01-06 14:46     ` Christian König
2012-01-06 15:00       ` Alex Deucher
2012-01-08 14:05 ` Daniel Vetter
2012-01-08 22:56   ` Jerome Glisse
2012-01-09  8:31     ` Daniel Vetter [this message]
2012-01-09 15:44       ` Jerome Glisse
2012-01-09 16:07         ` Alex Deucher
2012-01-09 16:49           ` Daniel Vetter
2012-01-09 16:56             ` Alex Deucher
2012-01-09 20:05               ` Daniel Vetter
2012-01-09 16:42         ` 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=20120109083116.GB3723@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=j.glisse@gmail.com \
    --cc=jglisse@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox