-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rinato: mce: Add hack to get screen blanking working
Rinato uses a modern kernel with modern DRM, which has a different interface for controlling backlight than the legacy framebuffer ioctl supported by MCE. As a workaround, hardcode the proper sysfs interaction for rinato. Of course, the proper fix would be to teach MCE how to correctly use the new interface.
- Loading branch information
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...inato/recipes-nemomobile/mce/mce/0001-Display-Hack-to-put-screen-to-sleep-on-Rinato.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 03a851f83c801a44c2c51420f8172104674c9732 Mon Sep 17 00:00:00 2001 | ||
From: casept <[email protected]> | ||
Date: Wed, 5 Feb 2025 19:18:54 +0000 | ||
Subject: [PATCH] Display: Hack to put screen to sleep on Rinato | ||
|
||
--- | ||
mce-fbdev.c | 5 +++++ | ||
1 file changed, 5 insertions(+) | ||
|
||
diff --git a/mce-fbdev.c b/mce-fbdev.c | ||
index 6212a91..b53b295 100644 | ||
--- a/mce-fbdev.c | ||
+++ b/mce-fbdev.c | ||
@@ -262,6 +262,11 @@ void mce_fbdev_set_power(bool power_on) | ||
{ | ||
mce_log(LL_DEBUG, "fbdev power %s", power_on ? "up" : (mce_fbdev_power_vsync_suspend ? "ambient" : "down")); | ||
|
||
+ if(power_on) { | ||
+ system("echo 0 > /sys/class/backlight/s6e63j0x03/bl_power"); | ||
+ } else { | ||
+ system("echo 4 > /sys/class/backlight/s6e63j0x03/bl_power"); | ||
+ } | ||
if( mce_fbdev_handle != -1 ) { | ||
int value; | ||
if (power_on) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FILESEXTRAPATHS:prepend:rinato := "${THISDIR}/${PN}:" | ||
|
||
SRC_URI:append:rinato = "file://0001-Display-Hack-to-put-screen-to-sleep-on-Rinato.patch" | ||
|