diff options
author | Rajat Jain <rajatja@google.com> | 2022-01-07 11:02:08 -0800 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2022-01-10 12:17:37 +0100 |
commit | 0af2e827b6acfd22b7794c148943a3ddfe5fbb65 (patch) | |
tree | 931cb926f8e2294d5abc8f057f69ed20cf4e7158 /drivers/gpu/drm/drm_privacy_screen_x86.c | |
parent | 3fb57847f6ec30e9aa27af7b37aed7a7419d50aa (diff) | |
download | linux-0af2e827b6acfd22b7794c148943a3ddfe5fbb65.tar.gz linux-0af2e827b6acfd22b7794c148943a3ddfe5fbb65.tar.bz2 linux-0af2e827b6acfd22b7794c148943a3ddfe5fbb65.zip |
drm/privacy_screen_x86: Add entry for ChromeOS privacy-screen
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>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220107190208.95479-3-rajatja@google.com
Diffstat (limited to 'drivers/gpu/drm/drm_privacy_screen_x86.c')
-rw-r--r-- | drivers/gpu/drm/drm_privacy_screen_x86.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_privacy_screen_x86.c b/drivers/gpu/drm/drm_privacy_screen_x86.c index a2cafb294ca6..88802cd7a1ee 100644 --- a/drivers/gpu/drm/drm_privacy_screen_x86.c +++ b/drivers/gpu/drm/drm_privacy_screen_x86.c @@ -47,6 +47,13 @@ static bool __init detect_thinkpad_privacy_screen(void) } #endif +#if IS_ENABLED(CONFIG_CHROMEOS_PRIVACY_SCREEN) +static bool __init detect_chromeos_privacy_screen(void) +{ + return acpi_dev_present("GOOG0010", NULL, -1); +} +#endif + static const struct arch_init_data arch_init_data[] __initconst = { #if IS_ENABLED(CONFIG_THINKPAD_ACPI) { @@ -58,6 +65,16 @@ static const struct arch_init_data arch_init_data[] __initconst = { .detect = detect_thinkpad_privacy_screen, }, #endif +#if IS_ENABLED(CONFIG_CHROMEOS_PRIVACY_SCREEN) + { + .lookup = { + .dev_id = NULL, + .con_id = NULL, + .provider = "privacy_screen-GOOG0010:00", + }, + .detect = detect_chromeos_privacy_screen, + }, +#endif }; void __init drm_privacy_screen_lookup_init(void) |