From: "Indan Zupancic" <indan@nul.nu>
To: "Jesse Barnes" <jbarnes@virtuousgeek.org>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>,
"Alex Riesen" <raa.lkml@gmail.com>,
"DRI mailing list" <dri-devel@lists.freedesktop.org>,
"Chris Wilson" <chris@chris-wilson.co.uk>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
stable@kernel.org
Subject: Re: [PATCH] fix backlight brightness on intel LVDS panel after reopening lid
Date: Wed, 23 Feb 2011 02:32:58 +0100 (CET) [thread overview]
Message-ID: <00ffee499c3a14f9f96aaf8575193dd9.squirrel@webmail.greenhost.nl> (raw)
In-Reply-To: <20110222130440.21a27714@jbarnes-desktop>
On Tue, February 22, 2011 22:04, Jesse Barnes wrote:
> On Sat, 19 Feb 2011 15:07:49 -0800
> Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
>> On Sat, Feb 19, 2011 at 4:26 AM, Alex Riesen <raa.lkml@gmail.com> wrote:
>> > On Sat, Feb 19, 2011 at 13:11, Alex Riesen <raa.lkml@gmail.com> wrote:
>> >>> Lastly, could you verify that my patch at https://lkml.org/lkml/2011/2/16/447
>> fixes
>> >>> it for you too? (Make sure you're at max brightness before rebooting.)
>> >>
>> >> I'll try it now.
>> >>
>> >
>> > I can confirm that it does fix backlight in my case (Dell XPS 1330,
>> > LVDS panel, GM965/GL960).
>> >
>> > Tested-by: Alex Riesen <raa.lkml@gmail.com>
>>
>> Guys, should I apply this, or will I get it through somebody's pull?
>
> I'm worried that removing combo mode will break some working setups,
> but if it's seen a lot of testing and is ok, then I'm fine with it, as
> it definitely simplifies things.
This all seems new code added in 2.6.37, it wasn't there before. The working
setups stopped working when that code was added. The only reason it may work
for some gen 2 and gen 3 hardware is because of a random value of the max
brightness (bit 16). The buggy code seems to be written in a haste without
any testing done. It's so off from the official documentation that I suspect
that the windows driver was used as reference, but its code was misinterpreted.
I grepped the userspace driver source, and LBPC is defined there for 810,
but not used anywhere either.
This patch should be added to stable kernel 2.6.37.2, because it messes
up the LPBC register, which some laptops store between boots.
Quoting https://bugzilla.kernel.org/show_bug.cgi?id=23472#c57
- Checking bit 16 in BLC_PWM_CTL is wrong, it has no special meaning.
- If LBPC == 0xff, it should be ignored and it's not in combination mode.
(This is for gen 3).
- Gen 2 documentation doesn't mention LBPC or combination mode at all.
Gen 3 does, but doesn't tell what the register value is or how to use it,
it just mentions it.
- The calculations are rubbish, resulting in bogus LBPC values, and
depending on how lucky you are, it writes different values for the
registers after a restore.
All this code is new and causes problems, while everything worked before
just fine, when the driver didn't do anything special.
So it seems a bit like voodoo programming, because nothing the driver did
followed the official Intel documentation.
Now, there may be real reasons for some of the code, but I propose we add
them one at a time when people show up with problems without the weird code
added. That way the reason for any weirdness is also documented.
Greetings,
Indan
next prev parent reply other threads:[~2011-02-23 1:33 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-16 4:16 Linux 2.6.38-rc5 Linus Torvalds
2011-02-16 11:14 ` Eric Dumazet
2011-02-16 13:55 ` Eric Dumazet
2011-02-16 15:46 ` Linus Torvalds
2011-02-16 16:06 ` Al Viro
2011-02-16 16:19 ` Al Viro
2011-02-16 16:33 ` Linus Torvalds
2011-02-16 16:39 ` Al Viro
2011-02-16 16:47 ` Eric Dumazet
2011-02-16 16:22 ` Eric Dumazet
2011-02-16 19:26 ` [PATCH] fix backlight brightness on intel LVDS panel after reopening lid Alex Riesen
2011-02-16 19:46 ` Alex Riesen
2011-02-16 19:54 ` Jesse Barnes
2011-02-16 19:59 ` Alex Riesen
2011-02-16 20:05 ` Jesse Barnes
2011-02-16 20:28 ` Alex Riesen
2011-02-17 1:41 ` [PATCH] drm/i915: Do not handle backlight combination mode specially Indan Zupancic
2011-02-17 22:13 ` [PATCH] fix backlight brightness on intel LVDS panel after reopening lid Tino Keitel
2011-02-18 4:57 ` Indan Zupancic
2011-02-19 12:11 ` Alex Riesen
2011-02-19 12:26 ` Alex Riesen
2011-02-19 23:07 ` Linus Torvalds
2011-02-22 21:04 ` Jesse Barnes
2011-02-22 22:31 ` Tino Keitel
2011-02-23 1:09 ` Linus Torvalds
2011-03-04 6:53 ` Indan Zupancic
2011-03-04 18:47 ` Linus Torvalds
2011-03-04 23:32 ` Indan Zupancic
2011-03-06 17:40 ` Alex Riesen
2011-03-10 5:50 ` Indan Zupancic
2011-03-10 6:00 ` Indan Zupancic
2011-03-10 7:49 ` Takashi Iwai
2011-03-10 8:25 ` Takashi Iwai
2011-03-10 10:06 ` Indan Zupancic
2011-03-10 12:59 ` Takashi Iwai
2011-03-10 13:02 ` [PATCH] drm/i915: Revive combination mode for backlight control Takashi Iwai
2011-03-10 19:36 ` Keith Packard
2011-03-11 1:30 ` Indan Zupancic
2011-03-11 1:23 ` Indan Zupancic
2011-03-11 1:28 ` Linus Torvalds
2011-03-11 7:26 ` Takashi Iwai
2011-03-11 9:08 ` Indan Zupancic
2011-03-11 7:34 ` Keith Packard
2011-03-10 8:45 ` [PATCH] fix backlight brightness on intel LVDS panel after reopening lid Indan Zupancic
2011-03-10 12:51 ` Takashi Iwai
2011-03-05 0:26 ` Peter Stuge
2011-02-23 1:32 ` Indan Zupancic [this message]
2011-02-20 14:03 ` Linux 2.6.38-rc5 Paul Rolland
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=00ffee499c3a14f9f96aaf8575193dd9.squirrel@webmail.greenhost.nl \
--to=indan@nul.nu \
--cc=chris@chris-wilson.co.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=raa.lkml@gmail.com \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.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
Powered by JetHome