[Intel-gfx] Backlight testing

Zhenyu Wang zhenyu.z.wang at intel.com
Wed May 14 09:30:44 CEST 2008


On 2008.04.25 11:37:53 +0800, Zhenyu Wang wrote:
> On 2008.04.24 14:47:10 +0200, Lukas Hejtmanek wrote:
> > Hello Jesse,
> > 
> > unfortunately, the latest head of the intel driver has problem with backlight
> > setting again.
> > 
> > If I change backlight setting while the xserver is running (using /sys
> > interface), using mplayer resets the setting back to the previous value.
> > 
> > I think it happens if I set backlight level and then call DPMS from On to On.
> > The current code does not reread the current value. The following patch works
> > for me:
> 
> Good catch, I think we can ignore backlight setting if current target
> power has already been on, or get/set current level as in your patch.
> 

After relook into this, I think this patch should be sufficient.

diff --git a/src/i830_lvds.c b/src/i830_lvds.c
index 899c6cb..8fb0bc7 100644
--- a/src/i830_lvds.c
+++ b/src/i830_lvds.c
@@ -398,6 +398,8 @@ i830SetLVDSPanelPower(xf86OutputPtr output, Bool on)
 	if (!(INREG(PP_CONTROL) & POWER_TARGET_ON) &&
 	    dev_priv->backlight_duty_cycle == 0)
 	    dev_priv->backlight_duty_cycle = dev_priv->backlight_max;
+	else
+	    dev_priv->backlight_duty_cycle = dev_priv->get_backlight(output);
 
 	OUTREG(PP_CONTROL, INREG(PP_CONTROL) | POWER_TARGET_ON);
 	do {

So if LVDS is on, it's good to check current backlight for sync
with other apps or even another xserver. Could you test with this one?
It seems mplayer doesn't try to change mode here. Jesse, how about this?

-- 
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: 189 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20080514/110c4ba9/attachment.sig>


More information about the Intel-gfx mailing list