Re: [ibm-acpi-devel] [PATCH v2 30/32] toshiba-acpi: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Hi, On 06/14/2015 05:15 AM, Azael Avalos wrote: > Hi Hans, > > Sorry for the late reply, I was out of town. > > 2015-06-12 5:23 GMT-06:00 Hans de Goede : >> Port the backlight selection logic to the new backlight interface >> selection API. >> >> Also fix a compiler warning about bt_present not be

[ibm-acpi-devel] [PATCH v3 01/35] apple_gmux: Use acpi_video_unregister_backlight instead of acpi_video_unregister

2015-06-16 Thread Hans de Goede
acpi_video_unregister() not only unregisters the acpi-video backlight interface but also unregisters the acpi video bus event listener, causing e.g. brightness hotkey presses to no longer generate keypress events. The unregistering of the acpi video bus event listener usually is undesirable, which

[ibm-acpi-devel] [PATCH v3 06/35] acpi-video-detect: Make acpi_video_get_capabilities a private function

2015-06-16 Thread Hans de Goede
acpi_video_get_capabilities() is only used inside video_detect.c so make it static. While at it also remove the prototype for the non existent acpi_video_display_switch_support function from acpi.h Signed-off-by: Hans de Goede --- drivers/acpi/video_detect.c | 3 +-- include/linux/acpi.h

[ibm-acpi-devel] [PATCH v3 02/35] asus-wmi: Use acpi_video_unregister_backlight instead of acpi_video_unregister

2015-06-16 Thread Hans de Goede
acpi_video_unregister() not only unregisters the acpi-video backlight interface but also unregisters the acpi video bus event listener, causing e.g. brightness hotkey presses to no longer generate keypress events. The unregistering of the acpi video bus event listener usually is undesirable, which

[ibm-acpi-devel] [PATCH v3 00/35] acpi-video: Rewrite backlight interface selection logic

2015-06-16 Thread Hans de Goede
Hi Rafael, As requested here is a rebased version of my acpi-video backlight interface selection logic rewrite. This is based on linux-pm/linux-next. I've also included 3 platform/x86 patches already queued up by Darren as you will need those to apply some later patches without conflicts. These s

[ibm-acpi-devel] [PATCH v3 08/35] acpi-video-detect: Move acpi_osi_is_win8 to osl.c

2015-06-16 Thread Hans de Goede
acpi_osi_is_win8 needs access to acpi_gbl_osi_data which is not exported, so move it to osl.c. Alternatively we could export acpi_gbl_osi_data but that seems undesirable. This allows video_detect.c to be build as a module, besides that acpi_osi_is_win8() is something which does not really belong i

[ibm-acpi-devel] [PATCH v3 04/35] apple-gmux: Stop using acpi_video_dmi_demote_vendor()

2015-06-16 Thread Hans de Goede
acpi_video_dmi_demote_vendor() is going away as part of the cleanup of the code for determinging which backlight class driver(s) to register. The call to acpi_video_dmi_demote_vendor() was meant to undo the call to acpi_video_dmi_promote_vendor() when the gmux device is removed, this is questionab

[ibm-acpi-devel] [PATCH v3 03/35] samsung-laptop: Use acpi_video_unregister_backlight instead of acpi_video_unregister

2015-06-16 Thread Hans de Goede
acpi_video_unregister() not only unregisters the acpi-video backlight interface but also unregisters the acpi video bus event listener, causing e.g. brightness hotkey presses to no longer generate keypress events. The unregistering of the acpi video bus event listener usually is undesirable, which

[ibm-acpi-devel] [PATCH v3 05/35] acpi-video-detect: Remove the unused acpi_video_dmi_demote_vendor() function

2015-06-16 Thread Hans de Goede
Remove the now unused acpi_video_dmi_demote_vendor() function, this was never a proper counter part of acpi_video_dmi_promote_vendor() since the calls to acpi_video_dmi_promote_vendor() are not counted. Signed-off-by: Hans de Goede --- drivers/acpi/video_detect.c | 9 - include/linux/acp

[ibm-acpi-devel] [PATCH v3 07/35] acpi-video-detect: Move acpi_is_video_device() to acpi/scan.c

2015-06-16 Thread Hans de Goede
This allows video_detect.c to be build as a module, this is a preparation patch for the backlight interface selection logic cleanup. Note this commit also causes acpi_is_video_device() to always be build indepedent of CONFIG_ACPI_VIDEO, as there is no reason to make its building depend on CONFIG_A

[ibm-acpi-devel] [PATCH v3 13/35] acpi-video: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Most of the patch is moving the dmi quirks for forcing use of the acpi-video / the native backlight interface to video_detect.c. What remains is a nice cleanup. Signed-off-by: Hans de Goede --- drivers/acpi/acpi_video.c | 172 ++-- drivers/acpi/video_de

[ibm-acpi-devel] [PATCH v3 09/35] acpi-video-detect: video: Make video_detect code part of the video module

2015-06-16 Thread Hans de Goede
This is a preparation patch for the backlight interface selection logic cleanup, there are 2 reasons to not always build the video_detect code into the kernel: 1) In order for the video_detect.c to also deal with / select native backlight interfaces on win8 systems, instead of doing this in video.

[ibm-acpi-devel] [PATCH v3 12/35] drm: i915: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
This results in a nice cleanup, as we can replace the complicated logic from should_ignore_backlight_request() with a simple check for the type being native. Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/intel_opregion.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-)

[ibm-acpi-devel] [PATCH v3 11/35] acpi-video-detect: Unregister acpi_video backlight when dmi quirks are added

2015-06-16 Thread Hans de Goede
Make acpi_video_set_dmi_backlight_type() call acpi_video_unregister_backlight() when the new dmi quirk results in the desired backlight interface being of a type other then acpi_backlight_video. This avoid the need for the second if in the following construction which is currently found in many pl

[ibm-acpi-devel] [PATCH v3 10/35] acpi-video-detect: Rewrite backlight interface selection logic

2015-06-16 Thread Hans de Goede
Currently we have 2 kernel commandline options + dmi-quirks in 3 places all interacting (in interesting ways) to select which which backlight interface to use. On the commandline we've acpi_backlight=[video|vendor] and video.use_native_backlight=[0|1]. DMI quirks we have in acpi/video-detect.c, acp

[ibm-acpi-devel] [PATCH v3 14/35] acpi-video: Move backlight notifier to video_detect.c

2015-06-16 Thread Hans de Goede
Move the unregistering of the acpi backlight interface on registering of a native backlight from video.c to video_detect.c where it belongs. Note this removes support for re-registering the acpi backlight interface when the native interface goes away. In practice this never happens and it needless

[ibm-acpi-devel] [PATCH v3 15/35] acpi-video: Move dmi_check_system from module_init to acpi_video_register

2015-06-16 Thread Hans de Goede
When builtin there is no guarantee in which order module_init functions are run, so acpi_video_register() may get called from the i915 driver (if it is also builtin) before acpi_video_init() gets called, resulting in the dmi quirks not yet being parsed. This commit moves the dmi_check_system() cal

[ibm-acpi-devel] [PATCH v3 19/35] asus-laptop: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. This commit also removes various obsolete pr_xxx messages related to backlight interface selection. These are obsolete because they assume there is only a vendor or acpi backlight driver and no other choice. Also they

[ibm-acpi-devel] [PATCH v3 22/35] dell-laptop: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede Acked-by: Pali Rohár --- drivers/platform/x86/dell-laptop.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/pla

[ibm-acpi-devel] [PATCH v3 18/35] apple-gmux: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede --- drivers/platform/x86/apple-gmux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c index a

[ibm-acpi-devel] [PATCH v3 21/35] compal-laptop: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede --- drivers/platform/x86/compal-laptop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-lapto

[ibm-acpi-devel] [PATCH v3 16/35] acpi-video: Fix acpi_video _register vs _unregister_backlight race

2015-06-16 Thread Hans de Goede
It is possible for a native backlight driver to load while acpi_video_register is running, which may lead to acpi_video_unregister_backlight being called while acpi_video_register is running and the 2 racing against eachother. The register_count variable protects against this, but not in a thread

[ibm-acpi-devel] [PATCH v3 17/35] acer-wmi: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. This commit also removes various obsolete pr_xxx messages related to backlight interface selection. These are obsolete because they assume there is only a vendor or acpi backlight driver and no other choice. Also they

[ibm-acpi-devel] [PATCH v3 20/35] asus-wmi: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. This commit also removes various obsolete pr_xxx messages related to backlight interface selection. These are obsolete because they assume there is only a vendor or acpi backlight driver and no other choice. Also they

[ibm-acpi-devel] [PATCH v3 26/35] ideapad-laptop: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede --- drivers/platform/x86/ideapad-laptop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-lapt

[ibm-acpi-devel] [PATCH v3 27/35] intel-oaktrail: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. This commit also removes various obsolete pr_xxx messages related to backlight interface selection. These are obsolete because they assume there is only a vendor or acpi backlight driver and no other choice. Also they

[ibm-acpi-devel] [PATCH v3 28/35] msi-laptop: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. This commit also removes various obsolete pr_xxx messages related to backlight interface selection. These are obsolete because they assume there is only a vendor or acpi backlight driver and no other choice. Also they

[ibm-acpi-devel] [PATCH v3 32/35] thinkpad-acpi: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede Acked-by: Henrique de Moraes Holschuh --- drivers/platform/x86/thinkpad_acpi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acp

[ibm-acpi-devel] [PATCH v3 33/35] toshiba-acpi: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede Acked-by: Azael Avalos --- Changes in v3: -Drop chunk fixing compiler warning, already fixed. --- drivers/platform/x86/toshiba_acpi.c | 7 ++- 1 file changed, 2 insertions(+), 5 del

[ibm-acpi-devel] [PATCH v3 30/35] samsung-laptop: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. This commit also removes various obsolete pr_xxx messages related to backlight interface selection. These are obsolete because they assume there is only a vendor or acpi backlight driver and no other choice. Also they

[ibm-acpi-devel] [PATCH v3 31/35] sony-laptop: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. This commit also removes various obsolete pr_xxx messages related to backlight interface selection. These are obsolete because they assume there is only a vendor or acpi backlight driver and no other choice. Also they

[ibm-acpi-devel] [PATCH v3 29/35] msi-wmi: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede --- drivers/platform/x86/msi-wmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c index 6d2bac0..9

[ibm-acpi-devel] [PATCH v3 24/35] eeepc-laptop: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. This commit also removes various obsolete pr_xxx messages related to backlight interface selection. These are obsolete because they assume there is only a vendor or acpi backlight driver and no other choice. Also they

[ibm-acpi-devel] [PATCH v3 25/35] fujitsu-laptop: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede Acked-by: Jonathan Woithe --- drivers/platform/x86/fujitsu-laptop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/fujitsu-laptop.c b/dr

[ibm-acpi-devel] [PATCH v3 23/35] dell-wmi: Port to new backlight interface selection API

2015-06-16 Thread Hans de Goede
Port the backlight selection logic to the new backlight interface selection API. Signed-off-by: Hans de Goede Acked-by: Pali Rohár --- drivers/platform/x86/dell-wmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/dell-wmi.c b/drivers/platform/x86/del

[ibm-acpi-devel] [PATCH v3 34/35] acpi-video-detect: Remove old API

2015-06-16 Thread Hans de Goede
Remove the old backlight interface selection API now that all drivers have been ported to the new API. Signed-off-by: Hans de Goede --- drivers/acpi/video_detect.c | 31 --- include/linux/acpi.h| 19 --- 2 files changed, 50 deletions(-) diff -

[ibm-acpi-devel] [PATCH v3 35/35] acpi-video: Make acpi_video_unregister_backlight() private

2015-06-16 Thread Hans de Goede
acpi_video_unregister_backlight() is now only used by video_detect.c which is part of the same acpi_video module as video.c, make acpi_video_unregister_backlight() private to this module. Signed-off-by: Hans de Goede --- drivers/acpi/acpi_video.c | 1 - drivers/acpi/video_detect.c | 2 ++ incl

Re: [ibm-acpi-devel] [PATCH v2 00/32] acpi-video: Rewrite backlight interface selection logic

2015-06-16 Thread Darren Hart
On Tue, Jun 16, 2015 at 01:22:40AM +0200, Rafael Wysocki wrote: > On Friday, June 12, 2015 01:23:19 PM Hans de Goede wrote: > > Hi All, > > > > Here is v2 of my rewrite / cleanup of the acpi-video (and platform/x86) > > backlight interface selection logic. > > > > The major change in v2 of this s