From: "Pali Rohár" <pali.rohar@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Zhang Rui <rui.zhang@intel.com>, Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Aaron Lu <aaron.lu@intel.com>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
Jani Nikula <jani.nikula@linux.intel.com>,
David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: ACPI/i915: Cannot configure display brightness on Dell Latitude E6440
Date: Tue, 23 Sep 2014 22:06:02 +0200 [thread overview]
Message-ID: <201409232206.02819@pali> (raw)
[-- Attachment #1: Type: Text/Plain, Size: 4353 bytes --]
Hello,
after big changes in acpi video/i915 code I cannot change display
brightness on my Dell Latitude E6440 with kernel 3.17-rc6. With
kernel 3.13 everything worked fine.
More information about this problem:
For configuring brightness on Dell laptops there are 4 ways:
1) via acpi video driver
2) via dell-laptop driver
3) via i915 drm driver
4) from userspace with special dell SMI call
(e.g with program dellLcdBrightness from libsmbios package)
Methods 2) and 4) are same, both making special SMI call and Bios
handing this request (just 2 is from kernel and 4 from userspace)
Method 1) via acpi video driver working, but is not perfect.
Driver can be used to change brightness (but only some levels,
probably this depends on acpi/DSDT tables), but cannot be used to
retrieve current brightness (when BIOS/SMI change brightness acpi
driver report old incorrect value). So I prefer dell-laptop
driver instead acpi video.
Method 3) working even with 3.17-rc6 kernel but because that
backlight device exported by i915 is marked as raw, desktop
programs prefer to use other devices.
Moreover it looks like that methods 1) 2) and 4) just forward
request to method 3). So in any cased brightness is changed by
i915 drm driver.
I'm not sure (correct me if I'm wrong!) but I think that intel
i915 drm driver accept changes (file intel_opregion.c) only if
acpi function acpi_video_verify_backlight_support() returns true.
Function acpi_video_verify_backlight_support() returns true iff:
function acpi_video_backlight_support() returns true AND at least
one of these functions returns false:
acpi_osi_is_win8()
acpi_video_use_native_backlight()
backlight_device_registered(BACKLIGHT_RAW)
On my notebook acpi_osi_is_win8() returns true (as is win8
compliant), backlight_device_registered(BACKLIGHT_RAW) returns
true as I'm using intel i915 drm driver with raw backlight device
and acpi_video_use_native_backlight() returns true/false
depending on "video.use_native_backlight" kernel param. Default
is true.
So if I want to have working acpi video driver with display
brightness support I need to boot kernel with param:
"video.use_native_backlight=0". I tested it with kernel 3.17-rc6
and this param really enabled display brightness support via acpi
video driver -- which is good.
Driver dell-laptop creating backligh device for brightness
control only if acpi_video_backlight_support() returns false.
There is complicated condition for it and when kernel is booted
with "video.use_native_backlight=0" that function returns true.
So conclusion is: With current code in kernel 3.17-rc6 it is not
possible to control brightness of display with native driver
dell-laptop on Dell Latitude E6440 (and probably on others
too)!!!
And Because laptop is win8 compliant and you create decision to
use native driver (instead acpi one) it is not possible to
control display brightness without tweeks in kernel cmdline.
As I wrote I would rather to use native dell-laptop driver for
controlling brightness, but it is not possible.
So how to solve this problem?
Quick solution would be to set use_native_backlight false for
some Dell laptops which means, that acpi video will be used and
in this case intel i915 driver will *not* drop backlight change
request.
Another solution could be to disable check in dell_laptop driver
and add use_native_backlight=0 to hooks. But this create two
backlight interfaces (which is not good), but only way (for now)
how to make dell_laptop working again.
Better and maybe only one proper solution would be to teach intel
drm i915 driver to not drop backlight change request for Dell
laptops (or all??). (This allows to work both acpi video and
dell_laptop drivers without any change and with *any* value in
param use_native_backlight). I think that problematic code is in
function asle_set_backlight() in file intel_opregion.c (but I'm
not sure). My idea is that "drop" event function it is caused by
this commit 0b9f7d93ca6109048a4eb06332b666b6e29df4fe (but I'm not
sure).
At least something must be done as I think that I'm not only one
who has Dell laptop and brightness configuration is really
important...
Thanks.
--
Pali Rohár
pali.rohar@gmail.com
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next reply other threads:[~2014-09-23 20:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-23 20:06 Pali Rohár [this message]
2014-09-23 20:31 ` ACPI/i915: Cannot configure display brightness on Dell Latitude E6440 Hans de Goede
2014-09-23 20:44 ` Pali Rohár
2014-09-24 8:19 ` Hans de Goede
2014-09-24 8:59 ` Pali Rohár
2014-09-24 9:14 ` Pali Rohár
2014-09-24 12:04 ` Hans de Goede
2014-09-24 12:53 ` Pali Rohár
2014-09-24 14:34 ` Hans de Goede
2014-09-24 18:21 ` Pali Rohár
2014-09-25 3:15 ` Aaron Lu
2014-09-25 14:23 ` Pali Rohár
2014-09-26 2:30 ` [PATCH] ACPI / i915: Update the condition to ignore firmware backlight change request Aaron Lu
2014-09-26 21:52 ` Rafael J. Wysocki
2014-09-29 7:16 ` Daniel Vetter
2014-09-25 19:58 ` ACPI/i915: Cannot configure display brightness on Dell Latitude E6440 Rafael J. Wysocki
2014-09-26 2:20 ` Aaron Lu
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=201409232206.02819@pali \
--to=pali.rohar@gmail.com \
--cc=aaron.lu@intel.com \
--cc=airlied@linux.ie \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hdegoede@redhat.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rui.zhang@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;
as well as URLs for NNTP newsgroup(s).