Allow detecting fallback video modes.

This commit is contained in:
Jonas 'Sortie' Termansen 2016-08-26 15:38:21 +02:00
parent 0b07e62259
commit 6944250bd1
2 changed files with 3 additions and 2 deletions

View File

@ -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 * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * 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_VALID = 1 << 0;
static const uint32_t DISPMSG_CONTROL_VGA = 1 << 1; 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_OTHER_RESOLUTIONS = 1 << 2;
static const uint32_t DISPMSG_CONTROL_FALLBACK = 1 << 3;
struct dispmsg_string struct dispmsg_string
{ {

View File

@ -222,7 +222,7 @@ static struct dispmsg_crtc_mode GetLogFallbackMode()
{ {
struct dispmsg_crtc_mode mode; struct dispmsg_crtc_mode mode;
memset(&mode, 0, sizeof(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.fb_format = Log::fallback_framebuffer_bpp;
mode.view_xres = (uint32_t) Log::fallback_framebuffer_width; mode.view_xres = (uint32_t) Log::fallback_framebuffer_width;
mode.view_yres = (uint32_t) Log::fallback_framebuffer_height; mode.view_yres = (uint32_t) Log::fallback_framebuffer_height;