From: "lists@antonello.org" <lists@antonello.org>
To: Matt Domsch <Matt_Domsch@dell.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Dell laptop backlight driver
Date: Mon, 29 Oct 2007 00:12:15 +0100 [thread overview]
Message-ID: <4725174F.40701@antonello.org> (raw)
In-Reply-To: <20071028192031.GA11442@auslistsprd01.us.dell.com>
Matt Domsch wrote:
> On Sun, Oct 28, 2007 at 07:06:23PM +0100, lists@antonello.org wrote:
>> Matt Domsch wrote:
>>> On Sun, Oct 28, 2007 at 05:12:37PM +0100, jack@antonello.org wrote:
>>>> Hello,
>>>> this driver implements backlight control on Dell laptops
>>>> which use SMI for changing brightness levels.
>>>>
>>>> The driver is INCOMPLETE since it is unable to probe some required
>>>> parameters
>>>> in order to perform backlight control. Such parameters are found in a Dell
>>>> proprietary DMI table which should be parsed. For now external tools may
>>>> be
>>>> used to find these parameters by hand. So if you intend to try this out,
>>>> FIRST write your laptop model parameters correctly inside the source code
>>>> as explained in Documentation/dell-laptop.txt.
>>>>
>>>> Parts of this driver may also be used to provide additional
>>>> functionalities
>>>> similarly to the drivers/misc/*-laptop.c drivers.
>>> Why is this better done in the kernel rather than in userspace with
>>> libsmbios as you've noted?
>>>
>> I had to do a kernelspace driver for controlling the backlight. This
>> was part of a college project assignment. In order for it to be valid
>> for an operating system course, it had to be in kernelspace (not
>> Unix programming) :).
>>
>> As i mentioned that can be done in userspace and it IS sensible to do
>> so. I know that the code which was already written for Dell implied
>> a userspace approach, but i simply had no choice.
>>
>> I also don't expect this driver to become mainstream, but since i have
>> written it, other people might want to have a look at it.
>
> OK, that's fair.
>
>
>> Finally i really don't think there's any sensible way of implementing
>> Linux LCD Backlight Abstraction relying on a userspace application.
>> That would mean the kernel calling userspace code to change the
>> brightness, then this latter code would again call the kernel to trigger
>> a SMI and so on. That's just not a good design. I think a userspace
>> solution implies choosing NOT to implement the LCD Abstraction. Causing
>> Dell laptops to be treated differently from other machines (as they are
>> not compliant with Linux's own interface).
>
> I've had this discussion on lkml before. Short story is, until Dell
> laptops implement the ACPI methods that the backlight API expects, the
> only sane way to do it is to let libsmbios handle it. Moving the
> fairly large and complex libsmbios into the kernel isn't a good idea
> (imho).
>
>
>
I agree. The problem is that Dell's DMI tables are not defined in the
SMBIOS standard. Thus getting the parameters required for the backlight
control (io port, io code, location) needs to be dealt with specifically.
Plus DMI is not as comprehensively supported as ACPI is under Linux.
I think reading Dell's tables to find out backlight parameters in
kernelspace is possible. Unfortunately it would require a significant
amount of brand new code to be written. And i'm not sure it is worth
the effort. Libsmbios is big and complex because it is written in
proficient C++ with lots of OO abstraction. It is also portable. But
the task accomplished is simple in principle.
jacopo
next prev parent reply other threads:[~2007-10-28 23:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-28 16:12 [PATCH] Dell laptop backlight driver jack
2007-10-28 16:19 ` Matt Domsch
2007-10-28 18:06 ` lists
2007-10-28 19:20 ` Matt Domsch
2007-10-28 23:12 ` lists [this message]
2007-10-29 15:40 ` Matthew Garrett
2007-10-30 14:52 ` Pavel Machek
2007-10-28 22:30 ` jack
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=4725174F.40701@antonello.org \
--to=lists@antonello.org \
--cc=Matt_Domsch@dell.com \
--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