From: Jani Nikula <jani.nikula@linux.intel.com>
To: Hans de Goede <hdegoede@redhat.com>,
Daniel Thompson <daniel.thompson@linaro.org>,
Martin Peres <martin.peres@linux.intel.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Cc: "Jingoo Han" <jingoohan1@gmail.com>,
"Martin Gräßlin" <mgraesslin@kde.org>,
"Lee Jones" <lee.jones@linaro.org>,
plasma-devel@kde.org
Subject: Re: KMS backlight ABI proposition
Date: Thu, 23 Feb 2017 10:55:22 +0200 [thread overview]
Message-ID: <8737f5i8w5.fsf@intel.com> (raw)
In-Reply-To: <c34f0b1c-8295-754d-1f06-25328673574f@redhat.com>
On Wed, 22 Feb 2017, Hans de Goede <hdegoede@redhat.com> wrote:
> My first thought was that your proposal is reasonable, but on second
> thought I foresee trouble here with e.g. the backlight level save / restore
> code in systemd still using the sysfs interface, while the desktop
> environment has moved on to the property, I believe we really need to
> do some sort of bi-directional syncing here ...
FWIW I think systemd should have no business changing the backlight. The
save/restore should belong in the desktop environments... But I think we
could dodge this one by having the initial sysfs value synced back to
the property on initialization, but not otherwise. The systemd stuff,
IIRC, happens before/after X.
>> We can bikeshed the meaning of 0 or -1, I don't mind. The point is, we
>> need to define what the drivers should aim for, with the potentially
>> limited information they have available, to provide as smooth and
>> unified an experience as possible.
>>
>> One benefit of -1 is that we might get away with adding that as a
>> special case later on, if we define 0 properly. And if the drivers know
>> they don't support off, they could have range 0..100 instead.
>
> I really believe that we need to define the ABI as 0 meaning minimal
> brightness which keeps the screen readable (which for the epaper
> example would be no brightness, but normally would be some minimal
> level).
We can define anything, but it doesn't mean it makes sense for the
drivers or that the drivers can implement it. By your above definition,
the right thing for the driver to do in the epaper case is to switch off
the backlight at 0, because switching it off completely can save more
power than just setting duty cycle to 0. That's the whole point for
epaper. And this contradicts with what you say below about backlight
on/off being orthogonal.
> Yes we do not get this right in some cases, but let at least define
> it properly in the ABI. Add a fat disclaimer for all I care that
> in some cases the driver is unable to guarantee this, but lets
> clearly define what 0 means and then try to get as much drivers
> to adhere to that as possible.
>
> As for -1 meaning turning stuff off, I'm against that, on/off
> vs brightness setting really are 2 almost orthogonal controls,
> in many cases in hardware they are truely orthogona, with both
> an enable pin as well as a pwm input for the brightness level,
> and driving the enable low will get the pwm input to effectively
> be ignored.
I think the crux with the on/off/minimum etc. is to have an ABI that
works sensibly also for drivers/hardware that is not able to switch
backlight off, or doesn't know whether the minimum is off or not. And we
need to have recommendations for drivers on what to do in the imperfect
reality.
BR,
Jani.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-02-23 8:55 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 12:58 KMS backlight ABI proposition Martin Peres
2017-02-20 12:46 ` Martin Peres
2017-02-20 14:11 ` Daniel Thompson
2017-02-22 15:05 ` Jani Nikula
2017-02-22 15:18 ` Martin Peres
2017-02-22 16:20 ` Hans de Goede
2017-02-23 8:55 ` Jani Nikula [this message]
2017-02-23 13:44 ` Hans de Goede
2017-02-20 16:25 ` Thierry Reding
2017-02-22 15:38 ` Jani Nikula
2017-02-20 19:27 ` Dave Airlie
2017-02-20 19:57 ` Hans de Goede
2017-02-22 15:08 ` Martin Peres
2017-02-20 22:40 ` Alex Deucher
2017-02-20 23:01 ` Jasper St. Pierre
2017-02-22 14:00 ` Jani Nikula
2017-02-22 16:35 ` Jasper St. Pierre
2017-02-22 15:48 ` Jani Nikula
2017-02-20 20:09 ` Hans de Goede
2017-02-22 14:14 ` Jani Nikula
2017-02-22 19:07 ` Stéphane Marchesin
2017-02-23 8:40 ` Jani Nikula
2017-02-23 13:38 ` Hans de Goede
2017-02-23 17:31 ` Stéphane Marchesin
2017-02-24 8:43 ` Jani Nikula
2017-02-24 8:55 ` Hans de Goede
2017-02-24 9:34 ` Jani Nikula
2017-02-24 9:46 ` Hans de Goede
2017-02-24 9:48 ` Hans de Goede
2017-02-24 9:59 ` Hans de Goede
2017-02-24 10:23 ` Martin Peres
2017-02-24 10:44 ` Hans de Goede
2017-02-24 12:56 ` Martin Peres
2017-02-24 11:16 ` Daniel Thompson
2017-02-24 11:41 ` Jani Nikula
2017-02-23 17:41 ` Jasper St. Pierre
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=8737f5i8w5.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=daniel.thompson@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=jingoohan1@gmail.com \
--cc=lee.jones@linaro.org \
--cc=martin.peres@linux.intel.com \
--cc=mgraesslin@kde.org \
--cc=plasma-devel@kde.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.