[Intel-gfx] [PATCH] Implement batch and ring buffer dumping
Eric Anholt
eric at anholt.net
Fri Feb 13 19:57:15 CET 2009
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
-------------- 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/8d4dbd73/attachment.sig>
More information about the Intel-gfx
mailing list