Patch "ACPI: video: Prefer native over vendor" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ACPI: video: Prefer native over vendor

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     acpi-video-prefer-native-over-vendor.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f056f16b2671b96992d9818eb091f95c6a9a7609
Author: Hans de Goede <hdegoede@xxxxxxxxxx>
Date:   Mon Nov 14 15:44:59 2022 +0100

    ACPI: video: Prefer native over vendor
    
    [ Upstream commit fb1836c91317e0770950260dfa91eb9b2170cb27 ]
    
    When available prefer native backlight control over vendor backlight
    control.
    
    Testing has shown that there are quite a few laptop models which rely
    on native backlight control (they don't have ACPI video bus backlight
    control) and on which acpi_osi_is_win8() returns false.
    
    Currently __acpi_video_get_backlight_type() returns vendor on these
    laptops, leading to an empty /sys/class/backlight.
    
    As a workaround for this acpi_video_backlight_use_native() has been
    temporarily changed to always return true.
    
    This re-introduces the problem of having multiple backlight
    devices under /sys/class/backlight for a single panel.
    
    Change __acpi_video_get_backlight_type() to prefer native over vendor
    when available. So that it returns native on these models.
    
    And change acpi_video_backlight_use_native() back to only return
    true when __acpi_video_get_backlight_type() returns native.
    
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 0c17ee93f861..76b7e7f8894e 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -795,10 +795,10 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
 		return acpi_backlight_video;
 
 	/* Use native if available */
-	if (native_available && prefer_native_over_acpi_video())
+	if (native_available)
 		return acpi_backlight_native;
 
-	/* No ACPI video (old hw), use vendor specific fw methods. */
+	/* No ACPI video/native (old hw), use vendor specific fw methods. */
 	return acpi_backlight_vendor;
 }
 
@@ -810,18 +810,6 @@ EXPORT_SYMBOL(acpi_video_get_backlight_type);
 
 bool acpi_video_backlight_use_native(void)
 {
-	/*
-	 * Call __acpi_video_get_backlight_type() to let it know that
-	 * a native backlight is available.
-	 */
-	__acpi_video_get_backlight_type(true);
-
-	/*
-	 * For now just always return true. There is a whole bunch of laptop
-	 * models where (video_caps & ACPI_VIDEO_BACKLIGHT) is false causing
-	 * __acpi_video_get_backlight_type() to return vendor, while these
-	 * models only have a native backlight control.
-	 */
-	return true;
+	return __acpi_video_get_backlight_type(true) == acpi_backlight_native;
 }
 EXPORT_SYMBOL(acpi_video_backlight_use_native);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux