summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-12-02 15:19:53 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-12-02 15:19:53 +0100
commit2c9f398ef19ebc6540aa15dea851c22e162bb83b (patch)
tree67e3b71ece0e0fecb7091b9613bc04b1e4ff9dbf /include
parent172c48caed91a978bca078042222d09baea13717 (diff)
parentccd45faf4973746c4f30ea41eec864e5cf191099 (diff)
Merge back earlier ACPI backlight driver changes for v6.8.
Diffstat (limited to 'include')
-rw-r--r--include/acpi/video.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/acpi/video.h b/include/acpi/video.h
index 4230392b5b0b..3d538d4178ab 100644
--- a/include/acpi/video.h
+++ b/include/acpi/video.h
@@ -75,6 +75,15 @@ static inline enum acpi_backlight_type acpi_video_get_backlight_type(void)
return __acpi_video_get_backlight_type(false, NULL);
}
+/*
+ * This function MUST only be called by GPU drivers to check if the driver
+ * should register a backlight class device. This function not only checks
+ * if a GPU native backlight device should be registered it *also* tells
+ * the ACPI video-detect code that native GPU backlight control is available.
+ * Therefor calling this from any place other then the GPU driver is wrong!
+ * To check if GPU native backlight control is used in other places instead use:
+ * if (acpi_video_get_backlight_type() == acpi_backlight_native) { ... }
+ */
static inline bool acpi_video_backlight_use_native(void)
{
return __acpi_video_get_backlight_type(true, NULL) == acpi_backlight_native;