xserver: Branch 'master'

David Nusinow dnusinow at speakeasy.net
Tue Jan 8 17:31:55 PST 2008


On Tue, Jan 08, 2008 at 08:39:13AM +0100, Michel Dänzer wrote:
> 
> On Mon, 2008-01-07 at 20:54 -0500, David Nusinow wrote:
> > On Mon, Jan 07, 2008 at 09:00:14AM +0100, Michel Dänzer wrote:
> > > 
> > > On Sun, 2008-01-06 at 13:37 -0800, David Nusinow wrote:
> > > > hw/xfree86/common/xf86DPMS.c |    3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > > 
> > > > New commits:
> > > > commit 260505e3c5a18044e97d31ea3bcc0955e46335c8
> > > > Author: David Nusinow <dnusinow at debian.org>
> > > > Date:   Sun Jan 6 16:37:13 2008 -0500
> > > > 
> > > >     Log enabling of DPMS even when it's not set in xorg.conf
> > > > 
> > > > diff --git a/hw/xfree86/common/xf86DPMS.c b/hw/xfree86/common/xf86DPMS.c
> > > > index 43efb8e..a23d81d 100644
> > > > --- a/hw/xfree86/common/xf86DPMS.c
> > > > +++ b/hw/xfree86/common/xf86DPMS.c
> > > > @@ -79,7 +79,6 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
> > > >  	    && !DPMSDisabledSwitch)
> > > >  	    DPMSEnabled = TRUE;
> > > >  	xf86MarkOptionUsed(DPMSOpt);
> > > > -	xf86DrvMsg(pScreen->myNum, X_CONFIG, "DPMS enabled\n");
> > > >      } else if (DPMSEnabledSwitch) {
> > > >  	if (!DPMSDisabledSwitch)
> > > >  	    DPMSEnabled = TRUE;
> > > > @@ -88,6 +87,8 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)
> > > >      else {
> > > >  	pDPMS->Enabled = defaultDPMSEnabled;
> > > >      }
> > > > +    if (pDPMS->Enabled)
> > > > +	xf86DrvMsg(pScreen->myNum, X_CONFIG, "DPMS enabled\n");
> > > 
> > > Please don't use X_CONFIG when it's not due to xorg.conf.
> > 
> > Crap, sorry about that. Thanks for catching this stupid copy 'n paste
> > idiocy. I'll push a patch that uses X_CONFIG when it's in xorg.conf and
> > X_INFO when not.
> 
> X_DEFAULT might be even better.

The reason why I didn't use X_DEFAULT was the weirdness with DPMSEnabled
and DPMSDisabledSwitch that you can see up there. I don't really understand
why there's a need for both these variables, and because of them I don't
fully understand what the default is. The DPMSDisabledSwitch definition
(dix/globals.c) has a comment about it being "lind switch states" but I
don't konw what this means either. As a result of this, I thought X_INFO
was the safer route. I'm happy to change it, or even clean out one of these
two variables, if someone explains what's going on there.

 - David Nusinow



More information about the xorg mailing list