Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a369a7100da3b4f5c2269be25160653d2c7013fc
Commit:     a369a7100da3b4f5c2269be25160653d2c7013fc
Parent:     0fb2ebfcb5f0b1916ed5ff260ec953ef616fec7c
Author:     Zwane Mwaikambo <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 2 12:14:12 2007 +0200
Committer:  Andi Kleen <[EMAIL PROTECTED]>
CommitDate: Mon Apr 2 12:14:12 2007 +0200

    [PATCH] x86: Don't probe for DDC on VBE1.2
    
    VBE1.2 doesn't support function 15h (DDC) resulting in a 'hang' whilst
    uncompressing kernel with some video cards. Make sure we check VBE version
    before fiddling around with DDC.
    
    http://bugzilla.kernel.org/show_bug.cgi?id=1458
    
    Opened: 2003-10-30 09:12 Last update: 2007-02-13 22:03
    
    Much thanks to Tobias Hain for help in testing and investigating the bug.
    Tested on;
    
    i386, Chips & Technologies 65548 VESA VBE 1.2
    CONFIG_VIDEO_SELECT=Y
    CONFIG_FIRMWARE_EDID=Y
    
    Untested on x86_64.
    
    Signed-off-by: Zwane Mwaikambo <[EMAIL PROTECTED]>
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
---
 arch/i386/boot/video.S   |   14 ++++++++++++++
 arch/x86_64/boot/video.S |   14 ++++++++++++++
 2 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S
index 2c5b5cc..8143c95 100644
--- a/arch/i386/boot/video.S
+++ b/arch/i386/boot/video.S
@@ -571,6 +571,16 @@ setr1:     lodsw
        jmp     _m_s
 
 check_vesa:
+#ifdef CONFIG_FIRMWARE_EDID
+       leaw    modelist+1024, %di
+       movw    $0x4f00, %ax
+       int     $0x10
+       cmpw    $0x004f, %ax
+       jnz     setbad
+
+       movw    4(%di), %ax
+       movw    %ax, vbe_version
+#endif
        leaw    modelist+1024, %di
        subb    $VIDEO_FIRST_VESA>>8, %bh
        movw    %bx, %cx                        # Get mode information structure
@@ -1945,6 +1955,9 @@ store_edid:
        rep
        stosl
 
+       cmpw    $0x0200, vbe_version            # only do EDID on >= VBE2.0
+       jl      no_edid
+
        pushw   %es                             # save ES
        xorw    %di, %di                        # Report Capability
        pushw   %di
@@ -1987,6 +2000,7 @@ do_restore:       .byte   0       # Screen contents 
altered during mode change
 svga_prefix:   .byte   VIDEO_FIRST_BIOS>>8     # Default prefix for BIOS modes
 graphic_mode:  .byte   0       # Graphic mode with a linear frame buffer
 dac_size:      .byte   6       # DAC bit depth
+vbe_version:   .word   0       # VBE bios version
 
 # Status messages
 keymsg:                .ascii  "Press <RETURN> to see video modes available, "
diff --git a/arch/x86_64/boot/video.S b/arch/x86_64/boot/video.S
index d6ff88f..6090516 100644
--- a/arch/x86_64/boot/video.S
+++ b/arch/x86_64/boot/video.S
@@ -571,6 +571,16 @@ setr1:     lodsw
        jmp     _m_s
 
 check_vesa:
+#ifdef CONFIG_FIRMWARE_EDID
+       leaw    modelist+1024, %di
+       movw    $0x4f00, %ax
+       int     $0x10
+       cmpw    $0x004f, %ax
+       jnz     setbad
+
+       movw    4(%di), %ax
+       movw    %ax, vbe_version
+#endif
        leaw    modelist+1024, %di
        subb    $VIDEO_FIRST_VESA>>8, %bh
        movw    %bx, %cx                        # Get mode information structure
@@ -1945,6 +1955,9 @@ store_edid:
        rep
        stosl
 
+       cmpw    $0x0200, vbe_version            # only do EDID on >= VBE2.0
+       jl      no_edid
+
        pushw   %es                             # save ES
        xorw    %di, %di                        # Report Capability
        pushw   %di
@@ -1987,6 +2000,7 @@ do_restore:       .byte   0       # Screen contents 
altered during mode change
 svga_prefix:   .byte   VIDEO_FIRST_BIOS>>8     # Default prefix for BIOS modes
 graphic_mode:  .byte   0       # Graphic mode with a linear frame buffer
 dac_size:      .byte   6       # DAC bit depth
+vbe_version:   .word   0       # VBE bios version
 
 # Status messages
 keymsg:                .ascii  "Press <RETURN> to see video modes available, "
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to