xf86-video-intel: src/backlight.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Nov 4 02:38:13 PST 2014


 src/backlight.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 7ecc778691c452285f754743a93a46fa1d3da52f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Nov 4 10:36:26 2014 +0000

    backlight: bl_power uses 0 for on and 4 for off
    
    The backlight/bl_power file didn't obey the obvious semantics, but
    instead operates using some interesting framebuffer API. Oh well.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/backlight.c b/src/backlight.c
index c7ff105..9f23986 100644
--- a/src/backlight.c
+++ b/src/backlight.c
@@ -485,7 +485,8 @@ int backlight_off(struct backlight *b)
 	if (!b->has_power)
 		return 0;
 
-	return __backlight_write(b->iface, "bl_power", "0");
+	/* 4 -> FB_BLANK_POWERDOWN */
+	return __backlight_write(b->iface, "bl_power", "4");
 }
 
 int backlight_on(struct backlight *b)
@@ -496,7 +497,8 @@ int backlight_on(struct backlight *b)
 	if (!b->has_power)
 		return 0;
 
-	return __backlight_write(b->iface, "bl_power", "1");
+	/* 0 -> FB_BLANK_UNBLANK */
+	return __backlight_write(b->iface, "bl_power", "0");
 }
 #endif
 


More information about the xorg-commit mailing list