From: Matthew Garrett <matthew.garrett@nebula.com>
To: "dh.herrmann@gmail.com" <dh.herrmann@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
"jg1.han@samsung.com" <jg1.han@samsung.com>,
"lee.jones@linaro.org" <lee.jones@linaro.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"cooloney@gmail.com" <cooloney@gmail.com>,
"airlied@gmail.com" <airlied@gmail.com>,
"ajax@redhat.com" <ajax@redhat.com>
Subject: Re: [PATCH RFC 0/4] Linking DRM Connectors to Backlight Devices
Date: Wed, 10 Sep 2014 20:40:57 +0000 [thread overview]
Message-ID: <1410381657.4117.3.camel@nebula.com> (raw)
In-Reply-To: <1410364463-12692-1-git-send-email-dh.herrmann@gmail.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2838 bytes --]
On Wed, 2014-09-10 at 17:54 +0200, David Herrmann wrote:
> * User-space currently has a hard-time figuring out which backlight device to
> use, and which backlight device belongs to which display. So far, most
> systems only provide backlight-devices for internal displays, so figuring out
> the connection is easy, but that might change with more capable external
> connectors.
The parent device of the backlight will be the correct display, if the
kernel has a meaningful way to determine that. We could do a better job
in the ACPI code than we currently do, but (unfortunately) that requires
us to know the ACPI IDs that each GPU vendor uses.
> If multiple backlights are available, the easiest solution is to simply write
> to all of them and hope at least one of them works. This obviously fails if
> the devices interact badly, so it's not really a solution.
There's a pretty well-defined process for that, although it sucks - if
it's an LVDS or eDP display and there's a backlight of type "firmware",
use it. If there's no "firmware" backlight, but there is a "platform"
one, use that. Otherwise look for a "native" backlight that has the
output as a parent. libbacklight does all of this for you.
> * User-space needs root privileges to write to sysfs. There are no char-devs
> that can be used to control access-management to the backlight API, so /sys
> is the only interface available. So far, udev policy has been "/sys is
> read-only for non-root" and it's not going to change. char-devs are *THE*
> standard way to provide non-root user-space APIs, so use them!
Yeah, this is a problem.
> This series tries to solve this problem with a much simpler approach:
> Instead of moving backlights into DRM, we simply link DRM properties to a
> backlight device. That is, the kernel manages a link between a connector and a
> backlight device (or n backlight devices) which can be modified by udev in case
> the kernel got it wrong (we don't want huge board-fixup-tables in the kernel).
> User-space can now use the simpl DRM API to manage backlights, and the kernel
> does not need any special driver code to make it work.
This doesn't really simplify userspace significantly - something's still
going to have to make the same policy decision as we do right now, and
the kernel isn't really the right place to do that. It does have the
benefit of allowing that policy decision to be made at boot time and
then allow that to be consumed by all later userspace, so there is
*some* benefit, but I think the "make unprivileged userspace possible"
argument is much more compelling.
--
Matthew Garrett <matthew.garrett@nebula.com>
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2014-09-10 20:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 15:54 [PATCH RFC 0/4] Linking DRM Connectors to Backlight Devices David Herrmann
2014-09-10 15:54 ` [PATCH RFC 1/4] backlight: use static initializers David Herrmann
2014-09-11 8:59 ` Jani Nikula
2014-09-10 15:54 ` [PATCH RFC 2/4] backlight: use spin-lock to protect device list David Herrmann
2014-09-11 9:00 ` Jani Nikula
2014-09-10 15:54 ` [PATCH RFC 3/4] backlight: add kernel-internal backlight API David Herrmann
2014-09-11 11:10 ` Thierry Reding
2014-09-11 11:14 ` David Herrmann
2014-09-11 11:21 ` Thierry Reding
2014-09-10 15:54 ` [PATCH RFC 4/4] drm: link connectors to backlight devices David Herrmann
2014-09-11 6:48 ` Daniel Vetter
2014-09-11 12:22 ` David Herrmann
2014-09-11 13:06 ` Daniel Vetter
2014-09-11 16:07 ` David Herrmann
2014-09-11 12:46 ` Jani Nikula
2014-09-10 20:40 ` Matthew Garrett [this message]
2014-09-11 12:48 ` [PATCH RFC 0/4] Linking DRM Connectors to Backlight Devices David Herrmann
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=1410381657.4117.3.camel@nebula.com \
--to=matthew.garrett@nebula.com \
--cc=airlied@gmail.com \
--cc=ajax@redhat.com \
--cc=cooloney@gmail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dh.herrmann@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jg1.han@samsung.com \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox