@@ -45,6 +45,17 @@ static bool __init detect_thinkpad_privacy_screen(void)
return (output & 0x10000) ? true : false;
}
+#elif IS_ENABLED(CONFIG_CHROMEOS_PRIVACY_SCREEN)
+
+static bool __init detect_chromeos_privacy_screen(void)
+{
+ if (!acpi_dev_present("GOOG0010", NULL, -1))
+ return false;
+
+ pr_info("%s: Need to wait for ChromeOS privacy-screen", __func__);
+ return true;
+
+}
#endif
static const struct arch_init_data arch_init_data[] __initconst = {
@@ -57,6 +68,15 @@ static const struct arch_init_data arch_init_data[] __initconst = {
},
.detect = detect_thinkpad_privacy_screen,
},
+#elif IS_ENABLED(CONFIG_CHROMEOS_PRIVACY_SCREEN)
+ {
+ .lookup = {
+ .dev_id = NULL,
+ .con_id = NULL,
+ .provider = "privacy_screen-GOOG0010:00",
+ },
+ .detect = detect_chromeos_privacy_screen,
+ },
#endif
};
Add a static entry in the x86 table, to detect and wait for privacy-screen on some ChromeOS platforms. Please note that this means that if CONFIG_CHROMEOS_PRIVACY_SCREEN is enabled, and if "GOOG0010" device is found in ACPI, then the i915 probe shall return EPROBE_DEFER until a platform driver actually registers the privacy-screen: https://hansdegoede.livejournal.com/25948.html Signed-off-by: Rajat Jain <rajatja@google.com> --- This patch is rebased on top of linux-next/master drivers/gpu/drm/drm_privacy_screen_x86.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)