diff mbox

Description for "Backlight" property in randrproto.txt

Message ID 20090818114659.GA9824@suse.de (mailing list archive)
State Not Applicable
Headers show

Commit Message

Matthias Hopf Aug. 18, 2009, 11:46 a.m. UTC
I'd like to document the Backlight property as a known good property.
Comments?

Matthias

Comments

Matthias Hopf Aug. 18, 2009, 2:31 p.m. UTC | #1
On Aug 18, 09 13:46:59 +0200, Matthias Hopf wrote:
> I'd like to document the Backlight property as a known good property.
> Comments?

Also I noted that the intel driver current uses BACKLIGHT as the
property name - I thought we all agreed that we wouldn't use any
ALL_CAPS names any more. Is this a left-over, or just an oversight?

And how to deal with this? Renaming this to Backlight in the driver
probably won't do any good, as some tools are already using the
BACKLIGHT one. Shall the implementation provide both cases for a while?

Also xbacklight should probably be changed to use Backlight if possible.

Matthias
Jesse Barnes Aug. 18, 2009, 3:53 p.m. UTC | #2
On Tue, 18 Aug 2009 16:31:59 +0200
Matthias Hopf <mhopf@suse.de> wrote:

> On Aug 18, 09 13:46:59 +0200, Matthias Hopf wrote:
> > I'd like to document the Backlight property as a known good
> > property. Comments?
> 
> Also I noted that the intel driver current uses BACKLIGHT as the
> property name - I thought we all agreed that we wouldn't use any
> ALL_CAPS names any more. Is this a left-over, or just an oversight?

Leftover I think, from before you standardized the xrandr props...

> And how to deal with this? Renaming this to Backlight in the driver
> probably won't do any good, as some tools are already using the
> BACKLIGHT one. Shall the implementation provide both cases for a
> while?
> 
> Also xbacklight should probably be changed to use Backlight if
> possible.

Yeah, we can make x-v-i take both.
Jesse Barnes Aug. 18, 2009, 3:55 p.m. UTC | #3
On Tue, 18 Aug 2009 13:46:59 +0200
Matthias Hopf <mhopf@suse.de> wrote:

> I'd like to document the Backlight property as a known good property.
> Comments?

I don't know how easy it will be to turn off the backlight in all cases
(iirc on some machines a 0 value passed to the hardware is minimum
brightness, and the only way to turn things off is to turn off the
panel altogether).  Other than that it looks fine.
Matthias Hopf Aug. 18, 2009, 4:38 p.m. UTC | #4
On Aug 18, 09 08:55:30 -0700, Jesse Barnes wrote:
> > I'd like to document the Backlight property as a known good property.
> > Comments?
> 
> I don't know how easy it will be to turn off the backlight in all cases
> (iirc on some machines a 0 value passed to the hardware is minimum
> brightness, and the only way to turn things off is to turn off the
> panel altogether).  Other than that it looks fine.

Yeah, that's why I wrote SHOULD only, which indicates desired behavior.
I have a patch sitting here now that might help on some systems to
achieve this (by writing to bl_power as well).

Matthias
Keith Packard Aug. 18, 2009, 10:28 p.m. UTC | #5
On Tue, 2009-08-18 at 16:31 +0200, Matthias Hopf wrote:

> Also I noted that the intel driver current uses BACKLIGHT as the
> property name - I thought we all agreed that we wouldn't use any
> ALL_CAPS names any more. Is this a left-over, or just an oversight?

It's unchanged from the initial implementation.

> And how to deal with this? Renaming this to Backlight in the driver
> probably won't do any good, as some tools are already using the
> BACKLIGHT one. Shall the implementation provide both cases for a while?
> 
> Also xbacklight should probably be changed to use Backlight if possible.

Yup, these both sound sensible. Sorry for using ALL_CAPS :-)
diff mbox

Patch

From 993dbda7b42caed7480dcff0eca4f9af9c1163ba Mon Sep 17 00:00:00 2001
From: Matthias Hopf <mhopf@suse.de>
Date: Tue, 18 Aug 2009 12:08:25 +0200
Subject: [PATCH] Add Backlight property description.

---
 randr.h        |    1 +
 randrproto.txt |   16 ++++++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/randr.h b/randr.h
index c624d96..1ee95f9 100644
--- a/randr.h
+++ b/randr.h
@@ -151,6 +151,7 @@  typedef unsigned long	XRandrModeFlags;
 
 /* Conventional RandR output properties */
 
+#define RR_PROPERTY_BACKLIGHT		"Backlight"
 #define RR_PROPERTY_RANDR_EDID		"EDID"
 #define RR_PROPERTY_SIGNAL_FORMAT	"SignalFormat"
 #define RR_PROPERTY_SIGNAL_PROPERTIES	"SignalProperties"
diff --git a/randrproto.txt b/randrproto.txt
index a70b8bd..8aacfb4 100644
--- a/randrproto.txt
+++ b/randrproto.txt
@@ -1401,6 +1401,16 @@  doesn't handle a mandatory property correctly.
 
 9.1 Known properties
 
+    "Backlight"			aka RR_PROPERTY_BACKLIGHT
+	Type:			int32
+	Flags:			-
+	Range/List:		0-x (driver specific)
+
+	This property controls the brightness on laptop panels and equivalent
+	displays with a backlight controller. The driver specific maximum
+	value MUST turn the backlight to full brightness, 1 SHOULD turn the
+	backlight to minimum brightness, 0 SHOULD turn the backlight off.
+
     "CloneList"			aka RR_PROPERTY_CLONE_LIST
 	Type:			int32 [2*n] / Atom pairs
 	Flags:			Immutable
@@ -1542,6 +1552,12 @@  ConnectorType			yes: static	RandR 1.3
 SignalFormat			no		RandR 1.3
 SignalProperties		no		not mandatory
 
+9.4 Properties introduced with version 1.4 of the RandR extension
+
+Property			Immutable	Mandatory since
+────────			─────────	───────────────
+Backlight			no		not mandatory
+
                               ❧❧❧❧❧❧❧❧❧❧❧
 
 10. Extension Versioning
-- 
1.6.0.2