All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@intel.com>
To: Seth Forshee <seth.forshee@canonical.com>
Cc: Len Brown <lenb@kernel.org>, "Rafael J. Wysocki" <rjw@sisk.pl>,
	linux-acpi@vger.kernel.org, Ben Jencks <ben@bjencks.net>,
	joeyli <jlee@suse.com>, Matthew Garrett <mjg59@srcf.ucam.org>
Subject: Re: [PATCH] ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads
Date: Tue, 02 Apr 2013 21:43:55 +0800	[thread overview]
Message-ID: <515AE09B.6000402@intel.com> (raw)
In-Reply-To: <20130402130000.GA12381@thinkpad-t410>

On 04/02/2013 09:00 PM, Seth Forshee wrote:
> On Tue, Apr 02, 2013 at 05:08:23PM +0800, Aaron Lu wrote:
>> On 04/01/2013 09:03 PM, Seth Forshee wrote:
>>> On Mon, Apr 01, 2013 at 09:53:36AM +0800, Aaron Lu wrote:
>>>> On 02/12/2013 12:21 AM, Seth Forshee wrote:
>>>>> The AML implementation for brightness control on several ThinkPads
>>>>> contains a workaround to meet a Windows 8 requirement of 101 brightness
>>>>> levels [1]. The implementation is flawed, as only 16 of the brighness
>>>>> values reported by _BCL affect a change in brightness. _BCM silently
>>>>> discards the rest of the values. Disabling Windows 8 compatibility on
>>>>> these machines reverts them to the old behavior, making _BCL only report
>>>>> the 16 brightness levels which actually work. Add a quirk to do this
>>>>> along with a dmi callback to disable Win8 compatibility.
>>>>
>>>> If we disable the _BQC(i.e. set cap._BQC=0) for these systems, will the
>>>> problem go away? If so, I think perhaps we can put these systems into a
>>>> _BQC quirk table and set cap._BQC=0 for them.
>>>
>>> That helps a little, but we're still left with only 16 of the 101
>>> brightness levels causing any change in brightness. The firmware isn't
>>> rounding the "bad" values or anything like that; it just silently
>>> ignores them.
>>
>> OK, and if GUI tool like g-s-d decides to go some more steps when
>> adjusting backlight level, it may always choose the non-functional
>> values. Hmm, doesn't seem to be an usable way then.
> 
> Exactly.
> 
>> I really wondered, how Windows handled this, it should have the same
>> problem, unless they are not using the acpi video interface?
> 
> I can only guess.
> 
> I think I remember reading that Windows 8 does smooth backlight
> transitions, so it may well hit every intermediate brightness value.
> Lenovo could also be supplying a driver which rounds values to the
> nearest working value or uses some other interface or something else.

Right, thanks for the hint.

> 
>>> I submitted a second set of patches [1] which writes all intermediate
>>> values between the old and new brightness values and disables _BQC for
>>> these machines (empirically rather than using a quirk table), though no
>>> one seems to be interested in reviewing them.
>>
>> Suppose we are at level 100, and the user sets the target level to be
>> 20, then we will need to call _BCM 80 times?
> 
> Yes. And on machines where _BQC actually returns legitimate values it
> will get called 80 times as well. On these Lenovo's we'd quickly
> determine that _BQC doesn't work and stop trying to use it however.

OK, but we still have to call it 80 times, right? From smooth point of
view, this might be a good thing, but I'm not sure if such change of
behaviour just for this problem is desired.

And I just took a look at patch 3, it seems to affect the normal code
path too, so we are changing the behaviour of a brightness level change
for some specific systems.

I really do not want these quirk code to pollute normal code path, it
made code difficult to understand and complicated. And all systems
suffer from this change, not just the affected ones.

I hope we can use quirk to differentiate them.

Thanks,
Aaron


  reply	other threads:[~2013-04-02 13:42 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-11 16:21 [PATCH] ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads Seth Forshee
2013-02-11 17:52 ` Matthew Garrett
2013-02-11 19:06   ` Seth Forshee
2013-02-11 19:09     ` Matthew Garrett
2013-02-11 19:31       ` Rafael J. Wysocki
2013-02-12  3:05         ` Seth Forshee
2013-02-13 20:32       ` Seth Forshee
2013-02-13 20:55         ` Matthew Garrett
2013-02-13 21:04           ` Ben Jencks
2013-02-13 21:49             ` Seth Forshee
2013-02-13 21:46           ` Seth Forshee
2013-02-13 21:54             ` Matthew Garrett
2013-02-13 22:04               ` Seth Forshee
2013-03-07 19:38           ` Seth Forshee
2013-03-07 19:39             ` [PATCH 1/5] ACPICA: Add interface for getting latest Windows version requested via _OSI Seth Forshee
2013-03-07 19:39               ` [PATCH 2/5] acpi_video: Avoid unnecessary conversions between backlight levels and indexes Seth Forshee
2013-03-07 19:39               ` [PATCH 3/5] acpi_video: Add workaround for broken Windows 8 backlight implementations Seth Forshee
2013-04-04 11:44                 ` Aaron Lu
2013-04-04 12:35                   ` Seth Forshee
2013-04-04 13:46                     ` Aaron Lu
2013-04-04 14:02                       ` Seth Forshee
2013-04-04 14:27                         ` Aaron Lu
2013-03-07 19:39               ` [PATCH 4/5] acpi_video: Disable use of _BQC when value doesn't match those set through _BCM Seth Forshee
2013-03-07 19:39               ` [PATCH 5/5] acpi_video: Don't handle ACPI brightness notifications by default Seth Forshee
2013-08-02  5:55                 ` Aaron Lu
2013-08-02 14:41                   ` Rafael J. Wysocki
2013-08-02 14:52                     ` Aaron Lu
2013-08-03  0:26                       ` Rafael J. Wysocki
2013-08-03  9:46                         ` Aaron Lu
2013-08-03 11:23                           ` Rafael J. Wysocki
2013-08-03 12:10                             ` Aaron Lu
2013-08-03 22:07                               ` Rafael J. Wysocki
2013-08-04  1:08                                 ` Aaron Lu
2013-03-18 21:25             ` [PATCH] ACPI: Disable Windows 8 compatibility for some Lenovo ThinkPads Seth Forshee
2013-04-02  5:18               ` Ben Jencks
2013-04-02  9:15                 ` Aaron Lu
2013-04-02 11:23                   ` Matthew Garrett
2013-04-02 13:44                     ` Aaron Lu
2013-04-02 19:08                       ` Matthew Garrett
2013-04-19 12:24               ` Seth Forshee
2013-04-20 22:06                 ` Rafael J. Wysocki
2013-04-21  2:29                   ` Seth Forshee
2013-04-21 15:46                     ` Henrique de Moraes Holschuh
2013-02-13 21:09       ` Ben Jencks
2013-04-01  1:53 ` Aaron Lu
2013-04-01 13:03   ` Seth Forshee
2013-04-02  9:08     ` Aaron Lu
2013-04-02 13:00       ` Seth Forshee
2013-04-02 13:43         ` Aaron Lu [this message]
2013-04-03  7:04         ` Ben Jencks
2013-04-03  7:27           ` Aaron Lu
2013-04-03 13:45             ` Seth Forshee
2013-04-04 11:39               ` Aaron Lu
2013-04-19  3:15           ` Aaron Lu
2013-04-20 22:06             ` Rafael J. Wysocki
2013-04-21 11:07               ` Aaron Lu
2013-04-21 12:11                 ` Aaron Lu
2013-04-21 21:42                 ` Rafael J. Wysocki
2013-04-22  9:39                   ` Aaron Lu
2013-04-22 11:51                     ` Rafael J. Wysocki
2013-04-22 12:11                       ` Aaron Lu
2013-04-22 13:06                         ` Seth Forshee
2013-04-22 13:40                           ` Aaron Lu
2013-04-22 13:56                             ` Seth Forshee
2013-04-22 14:07                               ` Aaron Lu
2013-04-22 15:11                                 ` Seth Forshee
2013-04-22  2:18             ` joeyli
2013-04-22 10:08               ` Aaron Lu
2013-04-22 12:00                 ` joeyli

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=515AE09B.6000402@intel.com \
    --to=aaron.lu@intel.com \
    --cc=ben@bjencks.net \
    --cc=jlee@suse.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=rjw@sisk.pl \
    --cc=seth.forshee@canonical.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 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.