Skip to content

Commit

Permalink
rinato: mce: Add hack to get screen blanking working
Browse files Browse the repository at this point in the history
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
casept committed Feb 6, 2025
1 parent aa34825 commit 452a896
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
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) {
4 changes: 4 additions & 0 deletions meta-rinato/recipes-nemomobile/mce/mce_%.bbappend
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"

0 comments on commit 452a896

Please sign in to comment.