public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: yakui_zhao <yakui.zhao@intel.com>,
	lenb@kernel.org, linux-acpi@vger.kernel.org,
	rpurdie@linux.intel.com, jbarnes@virtuousgeek.org,
	Zhang Rui <rui.zhang@intel.com>, Matthew Garrett <mjg@redhat.com>
Subject: Re: a backlight issue
Date: Thu, 6 Aug 2009 15:38:38 +0200	[thread overview]
Message-ID: <200908061538.39238.trenn@suse.de> (raw)
In-Reply-To: <20090806125552.GB15867@khazad-dum.debian.net>

On Thursday 06 August 2009 14:55:52 Henrique de Moraes Holschuh wrote:
> On Wed, 05 Aug 2009, Thomas Renninger wrote:
> > If in KMS drivers backlight switching method is implemented
> > and can register for the generic backlight driver, it should always
> > be
> > disabled by default. Instead, KMS drivers should export a simple
> > "backlight_enable" file somewhere in sysfs. If userspace doesn't
> > find a sysfs backlight interface, it can do:
> > echo 1 >/sys/path_to_graphics_card/backlight_enable
> > and a backlight sysfs interface should pop up on success.
> 
> IMO, we already have an in-kernel selector of the backlight control
> method for mutually-exclusive backlight control strategies.
You mean the ACPI vs native driver detection?

> We should use that, and if it is complete/good enough to add the KMS
> scenario, improve it.
You mean if it is *not* complete/good enough?

KMS popping in as a third kernel backlight provider makes things really
complicated for the kernel to choose the right thing.
Getting this prio:
1. generic ---ACPI
2. platform---platform drivers
3. legacy-----i915
solved in kernel automatically you need something like Rui/Yakui 
suggested:
  - Let KMS register first as I expect it will always initialize first
  - Let ACPI or platform driver unregister KMS backlight interface
    and take over
You never know when userspace plans to load the native drivers.
This complexity for a normally not needed fallback (ACPI or native 
drivers should be available) is complicated and error-prone.
This complexity should really be put to userspace where it's easy 
(three lines in bash) to solve, like I suggested above.

Maybe someone has another, easier idea to perfectly solve this 
automatically in kernel, I do not see it.

    Thomas

  reply	other threads:[~2009-08-06 13:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-25  2:09 a backlight issue yakui_zhao
2009-06-25  9:39 ` Richard Purdie
2009-08-05 12:50 ` Thomas Renninger
2009-08-06 12:55   ` Henrique de Moraes Holschuh
2009-08-06 13:38     ` Thomas Renninger [this message]
2009-08-06 19:50       ` Henrique de Moraes Holschuh
2009-08-07  8:25         ` Thomas Renninger
2009-08-23 12:41           ` Henrique de Moraes Holschuh

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=200908061538.39238.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=hmh@hmh.eng.br \
    --cc=jbarnes@virtuousgeek.org \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mjg@redhat.com \
    --cc=rpurdie@linux.intel.com \
    --cc=rui.zhang@intel.com \
    --cc=yakui.zhao@intel.com \
    /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