1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2025-01-07 12:11:28 +03:00

boot/init: Make FBDev a no-op

... this way, the framebuffer content is not evicted by a needless mode
change.

AFAIK none of our targets will be affected by this change. The
framebuffer should already be setup with the correct mode. This was
holdover from early early cargo-culting about the framebuffer.

I have verified on a few devices, it does not worsen their behaviour.
This commit is contained in:
Samuel Dionne-Riel 2023-04-24 19:02:18 -04:00
parent eb019f6e74
commit ffdc031b2c

View File

@ -21,12 +21,12 @@ class Tasks::Graphics < SingletonTask
end
# Handles the "legacy fbdev" style of framebuffers.
# (Does nothing, only handles dependencies)
class Tasks::Graphics::FBDev < SingletonTask
def initialize()
add_dependency(
:Files,
"/sys/class/graphics/fb0/mode",
"/sys/class/graphics/fb0/modes",
"/sys/class/graphics/fb0",
)
# This is only incidental to the fact that /dev/fb0 wouldn't exist for
# users of the "Graphics" dependency.
@ -34,9 +34,7 @@ class Tasks::Graphics::FBDev < SingletonTask
end
def run()
mode = File.read("/sys/class/graphics/fb0/modes")
log("Setting framebuffer mode to: #{mode}")
System.write("/sys/class/graphics/fb0/mode", mode)
# no-op
end
def ux_priority()