From 6944250bd117adf1276bccc8f5409e6a0d63a299 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Fri, 26 Aug 2016 15:38:21 +0200 Subject: [PATCH] Allow detecting fallback video modes. --- kernel/include/sortix/display.h | 3 ++- kernel/video.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/include/sortix/display.h b/kernel/include/sortix/display.h index 159e55f9..1ee80e37 100644 --- a/kernel/include/sortix/display.h +++ b/kernel/include/sortix/display.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012, 2014 Jonas 'Sortie' Termansen. + * Copyright (c) 2012, 2014, 2016 Jonas 'Sortie' Termansen. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -32,6 +32,7 @@ extern "C" { static const uint32_t DISPMSG_CONTROL_VALID = 1 << 0; static const uint32_t DISPMSG_CONTROL_VGA = 1 << 1; static const uint32_t DISPMSG_CONTROL_OTHER_RESOLUTIONS = 1 << 2; +static const uint32_t DISPMSG_CONTROL_FALLBACK = 1 << 3; struct dispmsg_string { diff --git a/kernel/video.cpp b/kernel/video.cpp index c95fcfe7..a2bcca56 100644 --- a/kernel/video.cpp +++ b/kernel/video.cpp @@ -222,7 +222,7 @@ static struct dispmsg_crtc_mode GetLogFallbackMode() { struct dispmsg_crtc_mode mode; memset(&mode, 0, sizeof(mode)); - mode.control = DISPMSG_CONTROL_VALID; + mode.control = DISPMSG_CONTROL_VALID | DISPMSG_CONTROL_FALLBACK; mode.fb_format = Log::fallback_framebuffer_bpp; mode.view_xres = (uint32_t) Log::fallback_framebuffer_width; mode.view_yres = (uint32_t) Log::fallback_framebuffer_height;