aboutsummaryrefslogtreecommitdiff
path: root/arch/i386/boot
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2006-06-26 00:26:37 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 09:58:30 -0700
commitba70710e59c701734aad524bc441b3400700e94b (patch)
treeb48dc0a2295ac3a1c76d60418c1ca0ddb02d99cc /arch/i386/boot
parent026fbe16c29848648599df9967b98250a6b86916 (diff)
[PATCH] fbdev: Firmware EDID fixes
- make firmware edid independent from framebuffer (No need to choose framebuffer just to disable this option - enable this option in X86_64 - check if VBE/DDC function is implemented before calling actual function Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/boot')
-rw-r--r--arch/i386/boot/video.S19
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S
index c9343c3a808..8c2a6faeeae 100644
--- a/arch/i386/boot/video.S
+++ b/arch/i386/boot/video.S
@@ -1929,7 +1929,7 @@ skip10: movb %ah, %al
ret
store_edid:
-#ifdef CONFIG_FB_FIRMWARE_EDID
+#ifdef CONFIG_FIRMWARE_EDID
pushw %es # just save all registers
pushw %ax
pushw %bx
@@ -1947,6 +1947,22 @@ store_edid:
rep
stosl
+ pushw %es # save ES
+ xorw %di, %di # Report Capability
+ pushw %di
+ popw %es # ES:DI must be 0:0
+ movw $0x4f15, %ax
+ xorw %bx, %bx
+ xorw %cx, %cx
+ int $0x10
+ popw %es # restore ES
+
+ cmpb $0x00, %ah # call successful
+ jne no_edid
+
+ cmpb $0x4f, %al # function supported
+ jne no_edid
+
movw $0x4f15, %ax # do VBE/DDC
movw $0x01, %bx
movw $0x00, %cx
@@ -1954,6 +1970,7 @@ store_edid:
movw $0x140, %di
int $0x10
+no_edid:
popw %di # restore all registers
popw %dx
popw %cx