From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Zhenyu Wang <zhen78@gmail.com>
Cc: Matthew Garrett <mjg@redhat.com>,
Keith Packard <keithp@keithp.com>,
intel-gfx@lists.freedesktop.org,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
"dri-devel@lists.sourceforge.net"
<dri-devel@lists.sourceforge.net>, Len Brown <lenb@kernel.org>
Subject: Re: [intel/acpi] backlight - T61
Date: Tue, 9 Dec 2008 13:24:47 -0800 [thread overview]
Message-ID: <200812091324.48361.jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <20081203231455.GA11829@localdomain>
On Wednesday, December 03, 2008 3:14 pm Zhenyu Wang wrote:
> On 2008.12.01 13:08:23 +0800, Zhang Rui 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);
> ---
>
> p.s Len, if for intel graphics specific issue, we have another
> intel-gfx@lists.freedesktop.org for such discuss. Thanks.
I'd be a little happier with a != BCM_KERNEL, but other than that it seems
fine.
--
Jesse Barnes, Intel Open Source Technology Center
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
next prev parent reply other threads:[~2008-12-09 21:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-28 6:47 [intel/acpi] backlight Yves-Alexis Perez
2008-11-28 19:18 ` [intel/acpi] backlight - T61 Len Brown
2008-11-28 22:38 ` Thomas Renninger
2008-11-28 22:50 ` Yves-Alexis Perez
2008-12-01 1:32 ` Zhang Rui
2008-12-01 3:18 ` Len Brown
2008-12-01 5:08 ` Zhang Rui
2008-12-03 23:14 ` Zhenyu Wang
2008-12-04 2:50 ` [Intel-gfx] " Zhenyu Wang
2008-12-09 21:24 ` Jesse Barnes [this message]
2008-12-01 1:08 ` [intel/acpi] backlight Zhao Yakui
2008-12-01 3:28 ` Len Brown
2008-12-01 8:38 ` Matthew Garrett
2008-12-01 19:27 ` Jesse Barnes
2008-12-01 19:32 ` Matthew Garrett
2008-12-01 11:11 ` Yves-Alexis Perez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200812091324.48361.jbarnes@virtuousgeek.org \
--to=jbarnes@virtuousgeek.org \
--cc=dri-devel@lists.sourceforge.net \
--cc=intel-gfx@lists.freedesktop.org \
--cc=keithp@keithp.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=mjg@redhat.com \
--cc=rui.zhang@intel.com \
--cc=zhen78@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox