mirror of
https://review.haiku-os.org/haiku
synced 2025-01-20 21:41:28 +01:00
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:
parent
f1994d8b4c
commit
d6edf65b05
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user