[Intel-gfx] [intel/acpi] backlight - T61
Zhenyu Wang
zhenyu.z.wang at intel.com
Thu Dec 4 03:50:14 CET 2008
On 2008.12.04 07:14:55 +0800, Zhenyu Wang wrote:
> > > However, testing FC10 with the latest upstream kernel,
> > > including the i915 changes that appeared today...
> > > it seems that GUI mode forgets the brighness when
> > > I switch to console mode. Eg. If I use /sys or
> > > hotkeys in GUI mode to reduce brightness to 0,
> > > it stays dim when I switch to console mode,
> > > but switches back to max brightness when
> > > I switch back to GUI mode.
> > hah, that's a done by X.
> > ZhenYu pointed out that the graphics driver will set the backlight to
> > maximum if it is 0 when switching to GUI.
> > what if reducing the brightness to a lower but not 0 level?
> > it should switch back to the original value, right?
> > cc ZhenYU. :)
>
> This depends on the backlight control method used by Xorg
> video driver. We have this comment in the driver from Jesse I think,
>
> /*
> * If we're going from off->on we may need to turn on the backlight.
> * We should use the saved value whenever possible, but on some
> * machines 0 is a valid backlight value (due to an external backlight
> * controller for example), so on them, when turning LVDS back on,
> * they'll always re-maximize the brightness.
> */
> if (!(INREG(PP_CONTROL) & POWER_TARGET_ON) &&
> dev_priv->backlight_duty_cycle == 0)
> dev_priv->backlight_duty_cycle = dev_priv->backlight_max;
>
> It looks if we're using kernel backlight method, '0' should be a human
> sensible dim level instead of meaningless near-to-black level, right?
>
> So how about this patch against current xf86-video-intel?
>
> ---
> diff --git a/src/i830_lvds.c b/src/i830_lvds.c
> index 239bc89..1799eab 100644
> --- a/src/i830_lvds.c
> +++ b/src/i830_lvds.c
> @@ -400,7 +400,8 @@ i830SetLVDSPanelPower(xf86OutputPtr output, Bool on)
> * they'll always re-maximize the brightness.
> */
> if (!(INREG(PP_CONTROL) & POWER_TARGET_ON) &&
> - dev_priv->backlight_duty_cycle == 0)
> + dev_priv->backlight_duty_cycle == 0 &&
> + pI830->backlight_control_method < BCM_KERNEL)
> dev_priv->backlight_duty_cycle = dev_priv->backlight_max;
>
> OUTREG(PP_CONTROL, INREG(PP_CONTROL) | POWER_TARGET_ON);
> ---
I've tested this patch on T61 just fine. I push this to
xf86-video-intel master now.
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20081204/41a77182/attachment.sig>
More information about the Intel-gfx
mailing list