[Intel-gfx] Prepare for 2.3.2
Lukas Hejtmanek
xhejtman at ics.muni.cz
Fri Jun 13 20:08:20 CEST 2008
On Fri, Jun 13, 2008 at 09:12:06AM -0700, Jesse Barnes wrote:
> Did you try what I suggested in response your last patch? I thought Zhenyu
> would push that, but I guess the code hasn't changed for awhile.
Not sure what do you mean.
> > @@ -1081,7 +1090,10 @@ i830_lvds_set_property(xf86OutputPtr output, Atom
> > property, "RRConfigureOutputProperty error, %d\n", ret); }
> > /* Set the current value of the backlight property */
> > - data = dev_priv->get_backlight(output);
> > + if ((INREG(PP_CONTROL)&POWER_TARGET_ON) && dev_priv->dpmsoff == 0)
> > + data = dev_priv->get_backlight(output);
> > + else
> > + data = dev_priv->backlight_duty_cycle;
> > ret = RRChangeOutputProperty(output->randr_output, backlight_atom,
> > XA_INTEGER, 32, PropModeReplace, 1,
> > &data, FALSE, TRUE);
> > @@ -1140,8 +1152,12 @@ i830_lvds_get_property(xf86OutputPtr output, Atom
> > property) */
> > if (property == backlight_atom) {
> > int val;
> > - val = dev_priv->get_backlight(output);
> > - dev_priv->backlight_duty_cycle = val;
> > + if ((INREG(PP_CONTROL)&POWER_TARGET_ON) && dev_priv->dpmsoff == 0)
> > + val = dev_priv->get_backlight(output);
> > + dev_priv->backlight_duty_cycle = val;
> > + } else {
> > + val = dev_priv->backlight_duty_cycle;
> > + }
> > ret = RRChangeOutputProperty(output->randr_output, backlight_atom,
> > XA_INTEGER, 32, PropModeReplace, 1,
> > &val, FALSE, TRUE);
>
> These changes are to avoid returning a 0 backlight brightness when the LCD is
> off? Or did you find cases where the value wasn't 0 even though the display
> was supposed to be off?
Well, it happened that my Xserver started with the maximum backlight value.
I wondered why this happens. I found that it is because the backlight value is
set to 0 somewhere in to code path during Xserver startup. Thereafter,
SetDPMSOn kicks the maximum backlight value.
So I investigated why I got backlight value to 0. And it was because there is
called DPMS Off during startup and while being off, randr gets initialized and
it calls lvds_set or lvds_get property (not sure which one) and it reads the
current backlight value and save it. However, the value is 0 as DPMS if OFF
now. I wonder why this happens now and not before. But it definitely happens.
--
Lukáš Hejtmánek
More information about the Intel-gfx
mailing list