All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <bwidawsk@gmail.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/8] drm/i915/context: context validation for execbuffer2
Date: Mon, 14 Feb 2011 15:10:49 -0800	[thread overview]
Message-ID: <20110214231049.GA25157@snipes.kumite> (raw)
In-Reply-To: <20110214202122.GA3569@viiv.ffwll.ch>

On Mon, Feb 14, 2011 at 09:21:22PM +0100, Daniel Vetter wrote:
> On Wed, Feb 02, 2011 at 03:00:17PM -0800, Ben Widawsky wrote:
> > Adds the support for actually doing something with buffer validation for
> > the context when submitted via execbuffer2. When a set of context flags
> > are submitted in the execbuffer call, the code is able to handle the
> > commands. It will also go through the existing buffers associated with
> > the context and make sure they are still present. The big thing missing
> > is if the client wants to change the domains of buffers which have
> > already been associated. In this case, the client must disassociate and
> > then re-associate with the proper domains.
> 
> Hm, this remark got me thinking (because currently with read/write domains
> per reloc domain changes on the fly are super-simple): Why not drop the
> whole associate/disassociate idea and require userspace to always submit a
> full list of bos still used by this context (and their required
> offsets)?
> 
The code has changed quite a bit since these patches:
http://cgit.freedesktop.org/~bwidawsk/drm-intel/

I have no problem with this. The complex part of the code has become
tracking when I can retire the context's backing object. As I see it,
your proposal is essentially an implicit associate (if it has an
offset), with no disassociate. In terms of the driver code to handle it,
it would just read through the flags instead of slots.

I had, and still have very little clue as to what clients of the
interface would like. I'm very scared of digging into mesa. A fear which
I am trying to get over presently. So if people think this is at least
as good, or better - then great!

I think what I'll do is fix the couple of outstanding bugs I'm aware
of, get a couple of better unit tests, do some kind of code review on
the result of that, start tinkering with mesa - and then decide which
one seems better. Unless others chime in and say they like one over the
other...

Your argument is pretty convincing. It seems the only advantage of slots
is you can save on the number of flags submitted per execbuffer call,
which is probably negligible since multiple people have said there are
relatively few buffers which we actually need to be tied to a context
anyway.

>   expecting to get this right on the first try is probably wishful
>   thinking.

This is my opinion as well, but I'm not sure everyone agrees.

> 
> Yours, Daniel

Thanks Daniel.
Ben

  reply	other threads:[~2011-02-14 23:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 23:00 [PATCH 0/8] drm/i915/context Ben Widawsky
2011-02-02 23:00 ` [PATCH 1/8] drm/i915/context: basic implementation context ioctls Ben Widawsky
2011-02-02 23:00 ` [PATCH 2/8] drm/i915/context: context initialization/destruction Ben Widawsky
2011-02-02 23:00 ` [PATCH 3/8] drm/i915/context: whitespace cleanup, and warning cleanup Ben Widawsky
2011-02-02 23:00 ` [PATCH 4/8] drm/i915/context: minimal support for contexts in execbuffer2 Ben Widawsky
2011-02-02 23:00 ` [PATCH 5/8] drm/i915/context: context validation for execbuffer2 Ben Widawsky
2011-02-14 20:21   ` Daniel Vetter
2011-02-14 23:10     ` Ben Widawsky [this message]
2011-02-02 23:00 ` [PATCH 6/8] drm/i915/context: enable calling context_switch Ben Widawsky
2011-02-02 23:00 ` [PATCH 7/8] drm/i915/context: Insert MI_SET_CONTEXT in ringbuffer context switch Ben Widawsky
2011-02-02 23:00 ` [PATCH 8/8] drm/i915/context: context switch, and PPGTT params Ben Widawsky
2011-02-02 23:29 ` [PATCH 0/8] drm/i915/context Chris Wilson
2011-02-02 23:55   ` Ben Widawsky

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=20110214231049.GA25157@snipes.kumite \
    --to=bwidawsk@gmail.com \
    --cc=daniel@ffwll.ch \
    --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.