On Mon, Dec 17, 2012 at 02:43:03PM +0100, Daniel Vetter wrote:
> On Mon, Dec 17, 2012 at 01:33:01PM +0000, Chris Wilson wrote:
> > On Sun, 16 Dec 2012 22:46:00 +0000, Chris Wilson <[email protected]>
> > wrote:
> > > @@ -1087,6 +1087,9 @@ i915_error_first_batchbuffer(struct
> > > drm_i915_private *dev_priv,
> > > if (!ring->get_seqno)
> > > return NULL;
> > >
> > > + if (HAS_BROKEN_CS_TLB(dev_priv->dev))
> > > + return i915_error_object_create(dev_priv, ring->private);
> >
> > Hmm, this is complicated by userspace opting out of the CS w/a, and
> > imposes quite a burden upon our simple seq interface.
>
> Right, I've written this without userspace being able to opt out in mind
> ... for the seq -ENOMEM, I guess it's just time to bite the bullet. Loads
> of the error_states for the ilk fallout couldn't be dumped (but could be
> captured) by bug reporters already :(
Assuming you're talking about debugfs error_state returning -ENOMEM due
to seq_file's massive kmalloc(), I had a couple of ideas for fixing it
in seq_file itself.
1) just use vmalloc()
2) use multiple pages instead of one big allocation
seq_printf() {
try to print the line
if not enough space {
mark the end of valid data in current page
allocate a new page
print again
}
}
And adjust seq_read()/seq_lseek accordingly.
Of course then you can't print anything > PAGE_SIZE,
but that seems unlikely anyway, and if really needed
it could try to allocate something larger than a page
when needed.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx