From d6edf65b059f0924dbec5ce0d110f8391cd209e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 20 Dec 2006 22:49:53 +0000 Subject: [PATCH] Fixed error checks for EDID retrieval. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19582 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/boot/platform/bios_ia32/video.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/system/boot/platform/bios_ia32/video.cpp b/src/system/boot/platform/bios_ia32/video.cpp index c7f1631c2c..ad249146f6 100644 --- a/src/system/boot/platform/bios_ia32/video.cpp +++ b/src/system/boot/platform/bios_ia32/video.cpp @@ -195,12 +195,15 @@ vesa_get_edid(edid1_info *info) regs.edi = 0; call_bios(0x10, ®s); + dprintf("EDID1: %lx\n", regs.eax); // %ah contains the error code - if ((regs.eax & 0xff00) != 0) + // %al determines wether or not the function is supported + if (regs.eax != 0x4f) return B_NOT_SUPPORTED; - // test if EDID v1 is supported by the monitor - if (((regs.ebx >> 8) & 1) == 0) + dprintf("EDID2: ebx %lx\n", regs.ebx); + // test if DDC is supported by the monitor + if ((regs.ebx & 3) == 0) return B_NOT_SUPPORTED; edid1_raw edidRaw; @@ -213,8 +216,9 @@ vesa_get_edid(edid1_info *info) regs.es = ADDRESS_SEGMENT(&edidRaw); regs.edi = ADDRESS_OFFSET(&edidRaw); call_bios(0x10, ®s); + dprintf("EDID3: %lx\n", regs.eax); - if ((regs.eax & 0xff00) != 0) + if (regs.eax != 0x4f) return B_NOT_SUPPORTED; // retrieved EDID - now parse it