Fixed error checks for EDID retrieval.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19582 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -195,12 +195,15 @@ vesa_get_edid(edid1_info *info)
|
|||||||
regs.edi = 0;
|
regs.edi = 0;
|
||||||
call_bios(0x10, ®s);
|
call_bios(0x10, ®s);
|
||||||
|
|
||||||
|
dprintf("EDID1: %lx\n", regs.eax);
|
||||||
// %ah contains the error code
|
// %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;
|
return B_NOT_SUPPORTED;
|
||||||
|
|
||||||
// test if EDID v1 is supported by the monitor
|
dprintf("EDID2: ebx %lx\n", regs.ebx);
|
||||||
if (((regs.ebx >> 8) & 1) == 0)
|
// test if DDC is supported by the monitor
|
||||||
|
if ((regs.ebx & 3) == 0)
|
||||||
return B_NOT_SUPPORTED;
|
return B_NOT_SUPPORTED;
|
||||||
|
|
||||||
edid1_raw edidRaw;
|
edid1_raw edidRaw;
|
||||||
@@ -213,8 +216,9 @@ vesa_get_edid(edid1_info *info)
|
|||||||
regs.es = ADDRESS_SEGMENT(&edidRaw);
|
regs.es = ADDRESS_SEGMENT(&edidRaw);
|
||||||
regs.edi = ADDRESS_OFFSET(&edidRaw);
|
regs.edi = ADDRESS_OFFSET(&edidRaw);
|
||||||
call_bios(0x10, ®s);
|
call_bios(0x10, ®s);
|
||||||
|
dprintf("EDID3: %lx\n", regs.eax);
|
||||||
|
|
||||||
if ((regs.eax & 0xff00) != 0)
|
if (regs.eax != 0x4f)
|
||||||
return B_NOT_SUPPORTED;
|
return B_NOT_SUPPORTED;
|
||||||
|
|
||||||
// retrieved EDID - now parse it
|
// retrieved EDID - now parse it
|
||||||
|
|||||||
Reference in New Issue
Block a user