pmaports/device/testing/linux-valve-jupiter/0002-drivers-video-backlight-Disable-backlight-notificati.patch

42 lines
1.5 KiB
Diff
Raw Normal View History

From 6122171153699e140375a99ad2b0cca7668617aa Mon Sep 17 00:00:00 2001
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
index 86e1cdc8e369..06641d99c209 100644
--- a/drivers/video/backlight/backlight.c
+++ b/drivers/video/backlight/backlight.c
@@ -160,6 +160,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) {
@@ -175,6 +176,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.44.0