Re-enable framebuffer
This commit is contained in:
parent
d73cbb5008
commit
abbf152d74
|
|
@ -56,7 +56,6 @@ impl FramebufferConsole {
|
|||
let bytes = alloc::vec![0u8; framebuffer.size()];
|
||||
Self {
|
||||
state: SpinLock::new(ConsoleState {
|
||||
enabled: true,
|
||||
x_pos: 0,
|
||||
y_pos: 0,
|
||||
fg_color: Pixel::WHITE,
|
||||
|
|
@ -68,21 +67,6 @@ impl FramebufferConsole {
|
|||
}
|
||||
}
|
||||
|
||||
/// Returns whether the console is enabled.
|
||||
pub fn is_enabled(&self) -> bool {
|
||||
self.state.lock().enabled
|
||||
}
|
||||
|
||||
/// Enables the console.
|
||||
pub fn enable(&self) {
|
||||
self.state.lock().enabled = true;
|
||||
}
|
||||
|
||||
/// Disables the console.
|
||||
pub fn disable(&self) {
|
||||
self.state.lock().enabled = false;
|
||||
}
|
||||
|
||||
/// Returns the current cursor position.
|
||||
pub fn cursor(&self) -> (usize, usize) {
|
||||
let state = self.state.lock();
|
||||
|
|
@ -130,8 +114,6 @@ impl core::fmt::Debug for FramebufferConsole {
|
|||
|
||||
#[derive(Debug)]
|
||||
struct ConsoleState {
|
||||
// FIXME: maybe we should drop the whole `ConsoleState` when it's disabled.
|
||||
enabled: bool,
|
||||
x_pos: usize,
|
||||
y_pos: usize,
|
||||
fg_color: Pixel,
|
||||
|
|
@ -207,10 +189,6 @@ impl ConsoleState {
|
|||
/// This method will panic if the buffer contains any characters
|
||||
/// other than Basic Latin characters (`U+0000` - `U+007F`).
|
||||
fn send_buf(&mut self, buf: &[u8]) {
|
||||
if !self.enabled {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: handle ANSI escape sequences.
|
||||
for &byte in buf.iter() {
|
||||
if byte != 0 {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@
|
|||
#![feature(associated_type_defaults)]
|
||||
#![register_tool(component_access_control)]
|
||||
|
||||
use aster_framebuffer::FRAMEBUFFER_CONSOLE;
|
||||
use kcmdline::KCmdlineArg;
|
||||
use ostd::{
|
||||
arch::qemu::{exit_qemu, QemuExitCode},
|
||||
|
|
@ -145,13 +144,6 @@ fn init_thread() {
|
|||
|
||||
print_banner();
|
||||
|
||||
// FIXME: CI fails due to suspected performance issues with the framebuffer console.
|
||||
// Additionally, userspace program may render GUIs using the framebuffer,
|
||||
// so we disable the framebuffer console here.
|
||||
if let Some(console) = FRAMEBUFFER_CONSOLE.get() {
|
||||
console.disable();
|
||||
};
|
||||
|
||||
let karg: KCmdlineArg = boot_info().kernel_cmdline.as_str().into();
|
||||
|
||||
let initproc = spawn_init_process(
|
||||
|
|
|
|||
Loading…
Reference in New Issue