From fc1ca8cb5a06a1a7f24d58ebe610b223e9460263 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 27 Nov 2012 20:50:13 +0100 Subject: [PATCH] Initialize the BCM2708 arch framebuffer in platform_init_video. --- .../boot/platform/raspberrypi_arm/video.cpp | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/system/boot/platform/raspberrypi_arm/video.cpp b/src/system/boot/platform/raspberrypi_arm/video.cpp index 9672899b9b..8aa249e037 100644 --- a/src/system/boot/platform/raspberrypi_arm/video.cpp +++ b/src/system/boot/platform/raspberrypi_arm/video.cpp @@ -6,6 +6,10 @@ #include +#include "arch_framebuffer.h" + +ArchFramebuffer *gFramebuffer = NULL; + extern "C" void platform_set_palette(const uint8* palette) @@ -31,7 +35,20 @@ platform_switch_to_text_mode(void) extern "C" status_t platform_init_video(void) { -#warning IMPLEMENT platform_init_video - return B_ERROR; + extern ArchFramebuffer* arch_get_framebuffer_arm_bcm2708(); + gFramebuffer = arch_get_framebuffer_arm_bcm2708(); + + if (gFramebuffer == NULL) + return B_ERROR; + + status_t result = gFramebuffer->Probe(); + if (result != B_OK) + return result; + + result = gFramebuffer->Init(); + if (result != B_OK) + return result; + + return gFramebuffer->SetDefaultMode(); }