2024-06-29 22:42:43 +00:00
From 174c99bdf20a4a9455bbbe22ac9e1aeaca714b4b Mon Sep 17 00:00:00 2001
2024-03-04 19:01:07 +00:00
From: "Pierre-Loup A. Griffais" <pgriffais@valvesoftware.com>
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 <cristian.ciocaltea@collabora.com>
---
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
2024-06-29 22:42:43 +00:00
index a82934694d05..b9daf4469143 100644
2024-03-04 19:01:07 +00:00
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
2024-06-29 22:42:43 +00:00
@@ -162,6 +162,7 @@ static inline void backlight_unregister_fb(struct backlight_device *bd)
2024-03-04 19:01:07 +00:00
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) {
2024-06-29 22:42:43 +00:00
@@ -177,6 +178,7 @@ static void backlight_generate_event(struct backlight_device *bd,
2024-03-04 19:01:07 +00:00
}
envp[1] = NULL;
kobject_uevent_env(&bd->dev.kobj, KOBJ_CHANGE, envp);
+#endif // 0
sysfs_notify(&bd->dev.kobj, NULL, "actual_brightness");
}
--
2024-06-29 22:42:43 +00:00
2.45.2
2024-03-04 19:01:07 +00:00