[PATCH] dix: be more verbose when we run out of opcodes

Aaron Plattner aplattner at nvidia.com
Mon Mar 29 10:48:19 PDT 2010


On Mon, Mar 29, 2010 at 10:40:50AM -0700, Paulo Zanoni wrote:
> Is is too late for 1.8?
> 
> (pinging since we're talking about the number of events in another thread)

Thanks for reminding me about this, Paulo.  The change attached to your
previous patch
Acked-by: Aaron Plattner <aplattner at nvidia.com>

> On Mon, Mar 15, 2010 at 11:13 AM, Paulo Ricardo Zanoni
> <pzanoni at mandriva.com> wrote:
> > Em Sex, 2010-03-12 às 23:06 +0100, Julien Cristau escreveu:
> >> On Fri, Mar 12, 2010 at 12:01:41 -0300, Paulo Ricardo Zanoni wrote:
> >>
> >> > From: Paulo Ricardo Zanoni <pzanoni at mandriva.com>
> >> > Date: Thu, 11 Mar 2010 14:28:18 -0300
> >> > Subject: [PATCH] dix: be more verbose when we run out of opcodes
> >> >
> >> > If we run out of opcodes, nothing is print on the log, making the
> >> > problem hard to debug. In the current Xserver, if you enable some
> >> > extensions like multibuffer (+2 events) and use nvidia binary driver (+5
> >> > events) you can run out of opcode numbers.
> >> >
> >> > Signed-off-by: Paulo Ricardo Zanoni <pzanoni at mandriva.com>
> >> > ---
> >> >  dix/extension.c |    5 ++++-
> >> >  1 files changed, 4 insertions(+), 1 deletions(-)
> >> >
> >> > diff --git a/dix/extension.c b/dix/extension.c
> >> > index fb83af1..30dc313 100644
> >> > --- a/dix/extension.c
> >> > +++ b/dix/extension.c
> >> > @@ -83,8 +83,11 @@ AddExtension(char *name, int NumEvents, int NumErrors,
> >> >      if (!MainProc || !SwappedMainProc || !MinorOpcodeProc)
> >> >          return((ExtensionEntry *) NULL);
> >> >      if ((lastEvent + NumEvents > LAST_EVENT) ||
> >> > -           (unsigned)(lastError + NumErrors > LAST_ERROR))
> >> > +           (unsigned)(lastError + NumErrors > LAST_ERROR)) {
> >> > +   LogMessage(X_ERROR, "Not enabling extension %s: maximum number of "
> >> > +              "events or errors exceeded.\n", name);
> >>
> >> funky whitespace on the LogMessage (not the same as the return below).
> >
> > I'm not sure if this is what you meant, but the attached version
> > replaces tabs with whitespaces. It applies fine with
> > --whitespace=error-all
> >
> > Btw, the whole file is not consistent about the usage of whitespaces or
> > tabs... Open it with vim and do "set list listchars=tab:>_" to see the
> > result. In most of the cases, tab is used when possible.
> >
> >
> >>
> >> >          return((ExtensionEntry *) NULL);
> >> > +    }
> >> >
> >> >      ext = xalloc(sizeof(ExtensionEntry));
> >> >      if (!ext)
> >>
> >> With that fixed,
> >> Reviewed-by: Julien Cristau <jcristau at debian.org>
> >>
> >> Cheers,
> >> Julien
> >
> >
> >
> > _______________________________________________
> > xorg-devel at lists.x.org: X.Org development
> > Archives: http://lists.x.org/archives/xorg-devel
> > Info: http://lists.x.org/mailman/listinfo/xorg-devel
> >
> 
> 
> 
> -- 
> Paulo R. Zanoni
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
> 


More information about the xorg-devel mailing list