From: Hans de Goede <hdegoede@redhat.com>
To: "Pali Rohár" <pali.rohar@gmail.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
Ike Panhc <ike.pan@canonical.com>,
linux-acpi@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net,
Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
acpi4asus-user@lists.sourceforge.net,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
dri-devel@lists.freedesktop.org,
Azael Avalos <coproscefalo@gmail.com>,
Lee Chun-Yi <jlee@suse.com>, Mattia Dongili <malattia@linux.it>,
Cezary Jackiewicz <cezary.jackiewicz@gmail.com>,
Ben Skeggs <bskeggs@redhat.com>,
Corentin Chary <corentin.chary@gmail.com>,
Darren Hart <dvhart@infradead.org>,
platform-driver-x86@vger.kernel.org,
Aaron Lu <aaron.lu@intel.com>
Subject: Re: [PATCH 19/32] dell-laptop: Port to new backlight interface selection API
Date: Thu, 11 Jun 2015 14:29:24 +0200 [thread overview]
Message-ID: <55797F24.8060500@redhat.com> (raw)
In-Reply-To: <20150611114709.GD19820@pali>
Hi,
On 11-06-15 13:47, Pali Rohár wrote:
> On Wednesday 10 June 2015 15:01:19 Hans de Goede wrote:
>> Port the backlight selection logic to the new backlight interface
>> selection API.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> drivers/platform/x86/dell-laptop.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
>> index d688d80..db2e031 100644
>> --- a/drivers/platform/x86/dell-laptop.c
>> +++ b/drivers/platform/x86/dell-laptop.c
>> @@ -31,6 +31,7 @@
>> #include <linux/slab.h>
>> #include <linux/debugfs.h>
>> #include <linux/seq_file.h>
>> +#include <acpi/video.h>
>> #include "../../firmware/dcdbas.h"
>>
>> #define BRIGHTNESS_TOKEN 0x7d
>> @@ -1921,10 +1922,7 @@ static int __init dell_init(void)
>> &dell_debugfs_fops);
>>
>> #ifdef CONFIG_ACPI
>> - /* In the event of an ACPI backlight being available, don't
>> - * register the platform controller.
>> - */
>> - if (acpi_video_backlight_support())
>> + if (acpi_video_get_backlight_type() != acpi_backlight_vendor)
>> return 0;
>> #endif
>>
>
> Now I'm thinking... Is this correct condition? And do we need it? This
> Dell backlight interface works even if ACPI or intel i915 driver
> controls backlight. Why we should prevent dell-laptop.ko to register
> Dell backlight interface if ACPI video already register one? And why not
> prevent when intel i915 driver register another?
3 things:
1) This is mostly a cleanup series, it does not make any behavioral
changes (other then renaming the kernelcmdline option and we've
already discussed fixing that).
2) All 3 drivers ultimately bit-bang the same hardware, we really should
have only one driver banging the hardware, so
if (acpi_video_get_backlight_type() != acpi_backlight_vendor)
return 0;
Definitely is the right thing todo here.
3) You're right that the intel_backlight still registering even if
acpi_video_get_backlight_type() != acpi_backlight_native is weird, but
that is how it was before this series, and userspace prefers firmware
type backlight sysfs entries over platform /raw ones so it will
automatically pick the right one. We should consider not registering
the backlight sysfs class interface from the intel code when
acpi_video_get_backlight_type() != acpi_backlight_native but that is
something for later...
Regards,
Hans
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-06-11 12:29 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-10 13:01 [PATCH 00/32] acpi-video: Rewrite backlight interface selection logic Hans de Goede
2015-06-10 13:01 ` [PATCH 01/32] apple-gmux: Stop using acpi_video_dmi_demote_vendor() Hans de Goede
2015-06-10 13:01 ` [PATCH 02/32] acpi-video-detect: Remove the unused acpi_video_dmi_demote_vendor() function Hans de Goede
2015-06-10 13:01 ` [PATCH 03/32] acpi-video-detect: Make acpi_video_get_capabilities a private function Hans de Goede
2015-06-10 13:01 ` [PATCH 04/32] acpi-video-detect: Move acpi_is_video_device() to acpi/scan.c Hans de Goede
2015-06-10 13:01 ` [PATCH 05/32] acpi-video-detect: Move acpi_osi_is_win8 to osl.c Hans de Goede
2015-06-10 13:01 ` [PATCH 06/32] acpi-video-detect: video: Make video_detect code part of the video module Hans de Goede
2015-06-10 13:01 ` [PATCH 07/32] acpi-video-detect: Rewrite backlight interface selection logic Hans de Goede
2015-06-11 9:00 ` Aaron Lu
2015-06-11 9:19 ` Hans de Goede
2015-06-11 9:29 ` Aaron Lu
2015-06-11 9:19 ` Pali Rohár
2015-06-11 9:29 ` Hans de Goede
2015-06-11 12:01 ` Pali Rohár
2015-06-11 12:28 ` Jani Nikula
[not found] ` <87bngm5szf.fsf-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-06-11 12:32 ` Hans de Goede
2015-06-10 13:01 ` [PATCH 08/32] acpi-video-detect: Unregister acpi_video backlight when dmi quirks are added Hans de Goede
2015-06-10 13:01 ` [PATCH 09/32] drm: i915: Port to new backlight interface selection API Hans de Goede
2015-06-10 13:01 ` [PATCH 10/32] acpi-video: " Hans de Goede
2015-06-10 13:01 ` [PATCH 11/32] acpi-video: Move backlight notifier to video_detect.c Hans de Goede
2015-06-10 13:01 ` [PATCH 12/32] acpi-video: Move dmi_check_system from module_init to acpi_video_register Hans de Goede
2015-06-10 13:01 ` [PATCH 13/32] acpi-video: Fix acpi_video _register vs _unregister_backlight race Hans de Goede
2015-06-10 13:01 ` [PATCH 14/32] acer-wmi: Port to new backlight interface selection API Hans de Goede
2015-06-11 3:01 ` joeyli
2015-06-10 13:01 ` [PATCH 15/32] apple-gmux: " Hans de Goede
2015-06-10 13:01 ` [PATCH 16/32] asus-laptop: " Hans de Goede
2015-06-10 13:01 ` [PATCH 17/32] asus-wmi: " Hans de Goede
2015-06-10 13:01 ` [PATCH 18/32] compal-laptop: " Hans de Goede
2015-06-10 13:01 ` [PATCH 19/32] dell-laptop: " Hans de Goede
2015-06-11 11:47 ` Pali Rohár
2015-06-11 12:29 ` Hans de Goede [this message]
2015-06-11 13:06 ` Pali Rohár
2015-06-10 13:01 ` [PATCH 20/32] dell-wmi: " Hans de Goede
2015-06-11 11:43 ` Pali Rohár
2015-06-11 12:19 ` Hans de Goede
2015-06-11 12:59 ` Pali Rohár
2015-06-10 13:01 ` [PATCH 21/32] eeepc-laptop: " Hans de Goede
2015-06-10 13:01 ` [PATCH 22/32] fujitsu-laptop: " Hans de Goede
2015-06-10 23:04 ` Jonathan Woithe
2015-06-10 13:01 ` [PATCH 23/32] ideapad-laptop: " Hans de Goede
2015-06-10 13:01 ` [PATCH 24/32] intel-oaktrail: " Hans de Goede
2015-06-10 13:01 ` [PATCH 25/32] msi-laptop: " Hans de Goede
2015-06-10 13:01 ` [PATCH 26/32] msi-wmi: " Hans de Goede
2015-06-10 13:01 ` [PATCH 27/32] samsung-laptop: " Hans de Goede
2015-06-10 13:01 ` [PATCH 28/32] sony-laptop: " Hans de Goede
2015-06-10 21:30 ` Mattia Dongili
2015-06-12 8:18 ` Hans de Goede
2015-06-10 13:01 ` [PATCH 29/32] thinkpad-acpi: " Hans de Goede
2015-06-10 13:59 ` Henrique de Moraes Holschuh
2015-06-10 13:01 ` [PATCH 30/32] toshiba-acpi: " Hans de Goede
2015-06-10 13:01 ` [PATCH 31/32] acpi-video-detect: Remove old API Hans de Goede
2015-06-10 13:01 ` [PATCH 32/32] acpi-video: Make acpi_video_unregister_backlight() private Hans de Goede
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=55797F24.8060500@redhat.com \
--to=hdegoede@redhat.com \
--cc=aaron.lu@intel.com \
--cc=acpi4asus-user@lists.sourceforge.net \
--cc=bskeggs@redhat.com \
--cc=cezary.jackiewicz@gmail.com \
--cc=coproscefalo@gmail.com \
--cc=corentin.chary@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=dvhart@infradead.org \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=ibm-acpi@hmh.eng.br \
--cc=ike.pan@canonical.com \
--cc=jlee@suse.com \
--cc=linux-acpi@vger.kernel.org \
--cc=malattia@linux.it \
--cc=mjg59@srcf.ucam.org \
--cc=pali.rohar@gmail.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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