From 174c99bdf20a4a9455bbbe22ac9e1aeaca714b4b Mon Sep 17 00:00:00 2001 From: "Pierre-Loup A. Griffais" Date: Tue, 14 Jun 2022 14:31:18 -0700 Subject: [PATCH 02/21] drivers: video: backlight: Disable backlight notification events. We don't want to generate udev events for brightness changes on Steam Deck, as some games like Celeste will re-enumerate controller devices in response to this event. Patch from Sam Lantinga. (cherry picked from commit 85da5a5f7b69f22f960776cde3bf5862f3613363) Signed-off-by: Cristian Ciocaltea --- drivers/video/backlight/backlight.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index a82934694d05..b9daf4469143 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -162,6 +162,7 @@ static inline void backlight_unregister_fb(struct backlight_device *bd) static void backlight_generate_event(struct backlight_device *bd, enum backlight_update_reason reason) { +#if 0 // We don't want to generate udev events for brightness changes on Steam Deck, as some games like Celeste will re-enumerate controller devices in response to this event. char *envp[2]; switch (reason) { @@ -177,6 +178,7 @@ static void backlight_generate_event(struct backlight_device *bd, } envp[1] = NULL; kobject_uevent_env(&bd->dev.kobj, KOBJ_CHANGE, envp); +#endif // 0 sysfs_notify(&bd->dev.kobj, NULL, "actual_brightness"); } -- 2.45.2