boot_loader_openfirmware: Fetch EDID
Read the EDID from OF and pass it on to the kernel. Last part of ticket #6105. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38307 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
36ee6a8731
commit
f5aaa387bd
@ -2,6 +2,10 @@ SubDir HAIKU_TOP src system boot platform openfirmware ;
|
||||
|
||||
SubDirC++Flags -D_BOOT_MODE -fno-rtti ;
|
||||
|
||||
UsePrivateHeaders [ FDirName graphics common ] ;
|
||||
|
||||
SEARCH_SOURCE += [ FDirName $(HAIKU_TOP) src add-ons accelerants common ] ;
|
||||
|
||||
local genericPlatformSources =
|
||||
text_menu.cpp
|
||||
video_blit.cpp
|
||||
@ -27,6 +31,11 @@ KernelMergeObject boot_platform_openfirmware.o :
|
||||
openfirmware_devices.cpp
|
||||
|
||||
$(genericPlatformSources)
|
||||
|
||||
# VESA/DDC EDID
|
||||
decode_edid.c
|
||||
dump_edid.c
|
||||
|
||||
:
|
||||
: boot_platform_openfirmware_$(TARGET_ARCH).a
|
||||
;
|
||||
|
@ -8,9 +8,13 @@
|
||||
#include <boot/platform.h>
|
||||
#include <boot/stage2.h>
|
||||
#include <boot/platform/generic/video.h>
|
||||
#include <edid.h>
|
||||
#include <platform/openfirmware/openfirmware.h>
|
||||
|
||||
|
||||
//#define TRACE_VIDEO
|
||||
|
||||
|
||||
static int sScreen;
|
||||
|
||||
|
||||
@ -111,6 +115,21 @@ platform_init_video(void)
|
||||
{
|
||||
gKernelArgs.frame_buffer.enabled = false;
|
||||
|
||||
int screen = of_finddevice("screen");
|
||||
if (screen == OF_FAILED)
|
||||
return B_NO_INIT;
|
||||
edid1_raw edidRaw;
|
||||
if (of_getprop(screen, "EDID", &edidRaw, sizeof(edidRaw)) != OF_FAILED) {
|
||||
edid1_info info;
|
||||
edid_decode(&info, &edidRaw);
|
||||
#ifdef TRACE_VIDEO
|
||||
edid_dump(&info);
|
||||
#endif
|
||||
gKernelArgs.edid_info = kernel_args_malloc(sizeof(edid1_info));
|
||||
if (gKernelArgs.edid_info != NULL)
|
||||
memcpy(gKernelArgs.edid_info, &info, sizeof(edid1_info));
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user