From 3d4b7ae96d81dc8ed4ecd556118b632c2707ff08 Mon Sep 17 00:00:00 2001 From: Lv Zheng Date: Thu, 24 Mar 2016 10:43:08 +0800 Subject: ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis This experiment moves module level If/Else/While executions to per-table basis. If regressions are found against the enabling of this experimental improvement, this patch is the only one that should get bisected out. Please report the regressions to the kernel bugzilla for further root causing. Link: https://bugzilla.kernel.org/show_bug.cgi?id=112911 Signed-off-by: Lv Zheng Tested-by: Chris Bainbridge Signed-off-by: Rafael J. Wysocki --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 17556979dc79..3d910e5e05f2 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -192,7 +192,7 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE); /* * Optionally support group module level code. */ -ACPI_INIT_GLOBAL(u8, acpi_gbl_group_module_level_code, TRUE); +ACPI_INIT_GLOBAL(u8, acpi_gbl_group_module_level_code, FALSE); /* * Optionally use 32-bit FADT addresses if and when there is a conflict -- cgit v1.2.3 From 059500940defe285222d3b189b366dfe7f299cae Mon Sep 17 00:00:00 2001 From: Aaron Lu Date: Wed, 27 Apr 2016 20:45:04 +0800 Subject: ACPI/video: export acpi_video_get_levels The acpi_video_get_levels is useful for other drivers, i.e. the to-be-added int3406 thermal driver, so export it. Signed-off-by: Aaron Lu Signed-off-by: Rafael J. Wysocki --- include/acpi/video.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'include/acpi') diff --git a/include/acpi/video.h b/include/acpi/video.h index 5ca2f2c16458..a4b96c971564 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h @@ -4,6 +4,19 @@ #include /* for ENODEV */ #include /* for bool */ +struct acpi_video_brightness_flags { + u8 _BCL_no_ac_battery_levels:1; /* no AC/Battery levels in _BCL */ + u8 _BCL_reversed:1; /* _BCL package is in a reversed order */ + u8 _BQC_use_index:1; /* _BQC returns an index value */ +}; + +struct acpi_video_device_brightness { + int curr; + int count; + int *levels; + struct acpi_video_brightness_flags flags; +}; + struct acpi_device; #define ACPI_VIDEO_CLASS "video" @@ -37,6 +50,8 @@ extern void acpi_video_set_dmi_backlight_type(enum acpi_backlight_type type); * may change over time and should not be cached. */ extern bool acpi_video_handles_brightness_key_presses(void); +extern int acpi_video_get_levels(struct acpi_device *device, + struct acpi_video_device_brightness **dev_br); #else static inline int acpi_video_register(void) { return 0; } static inline void acpi_video_unregister(void) { return; } @@ -56,6 +71,11 @@ static inline bool acpi_video_handles_brightness_key_presses(void) { return false; } +static int acpi_video_get_levels(struct acpi_device *device, + struct acpi_video_device_brightness **dev_br) +{ + return -ENODEV; +} #endif #endif -- cgit v1.2.3 From e4f35c1339f0cfcf38d3f63dd6fea2b070399263 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Thu, 12 May 2016 23:00:12 +0200 Subject: ACPI / video: mark acpi_video_get_levels() inline A recent patch added a stub function for acpi_video_get_levels when CONFIG_ACPI_VIDEO is disabled. However, this is marked as 'static' and causes a warning about an unused function whereever the header gets included: In file included from ../drivers/gpu/drm/radeon/radeon_acpi.c:28:0: include/acpi/video.h:74:12: error: 'acpi_video_get_levels' defined but not used [-Werror=unused-function] This makes the declaration 'static inline', which gets rid of the warning. Signed-off-by: Arnd Bergmann Fixes: 059500940def (ACPI/video: export acpi_video_get_levels) Signed-off-by: Rafael J. Wysocki --- include/acpi/video.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/acpi') diff --git a/include/acpi/video.h b/include/acpi/video.h index a4b96c971564..70a41f742037 100644 --- a/include/acpi/video.h +++ b/include/acpi/video.h @@ -71,7 +71,7 @@ static inline bool acpi_video_handles_brightness_key_presses(void) { return false; } -static int acpi_video_get_levels(struct acpi_device *device, +static inline int acpi_video_get_levels(struct acpi_device *device, struct acpi_video_device_brightness **dev_br) { return -ENODEV; -- cgit v1.2.3