diff options
author | Anssi Hannula <anssi@mandriva.org> | 2010-01-03 10:55:24 +0000 |
---|---|---|
committer | Anssi Hannula <anssi@mandriva.org> | 2010-01-03 10:55:24 +0000 |
commit | f97dbb043f3d4709c32b259b180d5121fb6e399a (patch) | |
tree | c5e5d228fc49962c8b14f889ee91b08cce09a28a /vbe.c | |
parent | e7a9275adee8532d7185996e50a3b8d8d1ffcd81 (diff) | |
download | monitor-edid-f97dbb043f3d4709c32b259b180d5121fb6e399a.tar monitor-edid-f97dbb043f3d4709c32b259b180d5121fb6e399a.tar.gz monitor-edid-f97dbb043f3d4709c32b259b180d5121fb6e399a.tar.bz2 monitor-edid-f97dbb043f3d4709c32b259b180d5121fb6e399a.tar.xz monitor-edid-f97dbb043f3d4709c32b259b180d5121fb6e399a.zip |
monitor-get-edid-using-vbe:
never retry in console mode if the card reports that the port does
not support DDC (usually this means that the port has no display
devices connected)
Diffstat (limited to 'vbe.c')
-rw-r--r-- | vbe.c | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -203,10 +203,10 @@ static int vbe_check_ddc_capabilities(int port) if (!(regs.ebx & 3)) { log_err("DDC (0x4f15:00): DDC not supported, not continuing\n", i); - return 0; + return 1; } - return 1; + return 2; } static int vbe_get_edid_info(char *edid, int port, int block) @@ -260,6 +260,12 @@ static int vbe_get_edid_info(char *edid, int port, int block) return 1; } +/* return values: + * size of edid: success + * 0: success but no edid + * -1: failure, VBE info call worked + * -2: failure, VBE info call didn't work + */ int get_edid(char *edid, int port, int skip_vbe_check) { int i, extensions; @@ -275,12 +281,13 @@ int get_edid(char *edid, int port, int skip_vbe_check) return -1; } - ok = vbe_check_ddc_capabilities(port) && - vbe_get_edid_info(edid, port, 0); - - if (!ok) + ok = vbe_check_ddc_capabilities(port); + if (ok == 1) /* success but no DDC */ return 0; + if (!ok || !vbe_get_edid_info(edid, port, 0)) + return -2; + extensions = ((unsigned char*)edid)[126]; if (extensions > MAX_EXTENSION_COUNT) { log_err("EDID: Reported %d extensions, only reading %d\n", |