[Intel-gfx] [PATCH] Implement batch and ring buffer dumping

Eric Anholt eric at anholt.net
Fri Feb 13 21:23:53 CET 2009


On Fri, 2009-02-13 at 14:50 -0500, Ben Gamari wrote:
> Yeah, that's a really good idea. I'll code that up this afternoon.
> Also, Eric, have you had a chance to look at the debugfs/seq_file
> changes (no pressure)? It looked like some of your patches, Chris,
> exposed more through procfs. You might want to consider rebasing on
> top of my procfs rework as it makes proc output far simpler. Just a
> thought.

Yeah, I do want to start pulling your stuff, at least for -next -- I
thought airlied was planning on it, but sounds like he would enjoy
delegating it.

Note that patches to the Linux kernel require Signed-off-by: footers,
signaling that you agree to what's described in
Documentation/SubmittingPatches.  With that for this series, I think
we're ready to go.

> On Fri, Feb 13, 2009 at 1:57 PM, Eric Anholt <eric at anholt.net> wrote:
> > On Fri, 2009-02-13 at 09:31 +0000, Chris Wilson wrote:
> >> On Tue, 2009-02-03 at 17:06 -0500, Ben Gamari wrote:
> >> > ---
> >> >  drivers/gpu/drm/i915/i915_drv.h         |   14 ++++
> >> >  drivers/gpu/drm/i915/i915_gem.c         |   17 +++---
> >> >  drivers/gpu/drm/i915/i915_gem_debugfs.c |  102 +++++++++++++++++++++++++++++++
> >> >  3 files changed, 125 insertions(+), 8 deletions(-)
> >> >
> >> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> >> > index f8abc79..53e169c 100644
> >> > --- a/drivers/gpu/drm/i915/i915_drv.h
> >> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> >> > @@ -374,6 +374,15 @@ typedef struct drm_i915_private {
> >> >
> >> >             /* storage for physical objects */
> >> >             struct drm_i915_gem_phys_object *phys_objs[I915_MAX_PHYS_OBJECT];
> >> > +
> >> > +           /**
> >> > +            * Ring buffer for recently submitted batch buffer objects
> >> > +            * This is for keeping track of batch buffers referenced while
> >> > +            * dumping the ring buffer
> >> > +            */
> >> > +#define I915_GEM_RECENT_BATCH_LEN 10
> >> > +           struct drm_gem_object *recent_batch_list[I915_GEM_RECENT_BATCH_LEN];
> >> > +           int recent_batch_head;
> >> >     } mm;
> >> >  } drm_i915_private_t;
> >>
> >> When I used this in anger, the problem I encountered was that storing
> >> the last 10 *submitted* batches was not enough to cache the currently
> >> executing batch buffer. Can I suggest that instead of maintaining a ring
> >> of recently submitted batches, we just dump the contents of any buffer
> >> in the active list that has COMMAND_DOMAIN in its read_domains? Just a
> >> single file under /dri and include a single line header to mark the
> >> boundaries of each buffer.
> >
> > I like this plan.  Way better than what I suggested.
> >
> > --
> > Eric Anholt
> > eric at anholt.net                         eric.anholt at intel.com
> >
> >
> >
-- 
Eric Anholt
eric at anholt.net                         eric.anholt at intel.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090213/3a85319d/attachment.sig>


More information about the Intel-gfx mailing list