[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>
This commit is contained in:
parent
026fbe16c2
commit
ba70710e59
@ -1929,7 +1929,7 @@ skip10: movb %ah, %al
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
store_edid:
|
store_edid:
|
||||||
#ifdef CONFIG_FB_FIRMWARE_EDID
|
#ifdef CONFIG_FIRMWARE_EDID
|
||||||
pushw %es # just save all registers
|
pushw %es # just save all registers
|
||||||
pushw %ax
|
pushw %ax
|
||||||
pushw %bx
|
pushw %bx
|
||||||
@ -1947,6 +1947,22 @@ store_edid:
|
|||||||
rep
|
rep
|
||||||
stosl
|
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 $0x4f15, %ax # do VBE/DDC
|
||||||
movw $0x01, %bx
|
movw $0x01, %bx
|
||||||
movw $0x00, %cx
|
movw $0x00, %cx
|
||||||
@ -1954,6 +1970,7 @@ store_edid:
|
|||||||
movw $0x140, %di
|
movw $0x140, %di
|
||||||
int $0x10
|
int $0x10
|
||||||
|
|
||||||
|
no_edid:
|
||||||
popw %di # restore all registers
|
popw %di # restore all registers
|
||||||
popw %dx
|
popw %dx
|
||||||
popw %cx
|
popw %cx
|
||||||
|
@ -1929,6 +1929,7 @@ skip10: movb %ah, %al
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
store_edid:
|
store_edid:
|
||||||
|
#ifdef CONFIG_FIRMWARE_EDID
|
||||||
pushw %es # just save all registers
|
pushw %es # just save all registers
|
||||||
pushw %ax
|
pushw %ax
|
||||||
pushw %bx
|
pushw %bx
|
||||||
@ -1946,6 +1947,22 @@ store_edid:
|
|||||||
rep
|
rep
|
||||||
stosl
|
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 $0x4f15, %ax # do VBE/DDC
|
||||||
movw $0x01, %bx
|
movw $0x01, %bx
|
||||||
movw $0x00, %cx
|
movw $0x00, %cx
|
||||||
@ -1953,12 +1970,14 @@ store_edid:
|
|||||||
movw $0x140, %di
|
movw $0x140, %di
|
||||||
int $0x10
|
int $0x10
|
||||||
|
|
||||||
|
no_edid:
|
||||||
popw %di # restore all registers
|
popw %di # restore all registers
|
||||||
popw %dx
|
popw %dx
|
||||||
popw %cx
|
popw %cx
|
||||||
popw %bx
|
popw %bx
|
||||||
popw %ax
|
popw %ax
|
||||||
popw %es
|
popw %es
|
||||||
|
#endif
|
||||||
ret
|
ret
|
||||||
|
|
||||||
# VIDEO_SELECT-only variables
|
# VIDEO_SELECT-only variables
|
||||||
|
@ -109,6 +109,7 @@ struct sys_desc_table_struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct edid_info edid_info;
|
struct edid_info edid_info;
|
||||||
|
EXPORT_SYMBOL_GPL(edid_info);
|
||||||
struct e820map e820;
|
struct e820map e820;
|
||||||
|
|
||||||
extern int root_mountflags;
|
extern int root_mountflags;
|
||||||
|
@ -4,6 +4,21 @@
|
|||||||
|
|
||||||
menu "Graphics support"
|
menu "Graphics support"
|
||||||
|
|
||||||
|
config FIRMWARE_EDID
|
||||||
|
bool "Enable firmware EDID"
|
||||||
|
default y
|
||||||
|
---help---
|
||||||
|
This enables access to the EDID transferred from the firmware.
|
||||||
|
On the i386, this is from the Video BIOS. Enable this if DDC/I2C
|
||||||
|
transfers do not work for your driver and if you are using
|
||||||
|
nvidiafb, i810fb or savagefb.
|
||||||
|
|
||||||
|
In general, choosing Y for this option is safe. If you
|
||||||
|
experience extremely long delays while booting before you get
|
||||||
|
something on your display, try setting this to N. Matrox cards in
|
||||||
|
combination with certain motherboards and monitors are known to
|
||||||
|
suffer from this problem.
|
||||||
|
|
||||||
config FB
|
config FB
|
||||||
tristate "Support for frame buffer devices"
|
tristate "Support for frame buffer devices"
|
||||||
---help---
|
---help---
|
||||||
@ -70,22 +85,6 @@ config FB_MACMODES
|
|||||||
depends on FB
|
depends on FB
|
||||||
default n
|
default n
|
||||||
|
|
||||||
config FB_FIRMWARE_EDID
|
|
||||||
bool "Enable firmware EDID"
|
|
||||||
depends on FB
|
|
||||||
default y
|
|
||||||
---help---
|
|
||||||
This enables access to the EDID transferred from the firmware.
|
|
||||||
On the i386, this is from the Video BIOS. Enable this if DDC/I2C
|
|
||||||
transfers do not work for your driver and if you are using
|
|
||||||
nvidiafb, i810fb or savagefb.
|
|
||||||
|
|
||||||
In general, choosing Y for this option is safe. If you
|
|
||||||
experience extremely long delays while booting before you get
|
|
||||||
something on your display, try setting this to N. Matrox cards in
|
|
||||||
combination with certain motherboards and monitors are known to
|
|
||||||
suffer from this problem.
|
|
||||||
|
|
||||||
config FB_BACKLIGHT
|
config FB_BACKLIGHT
|
||||||
bool
|
bool
|
||||||
depends on FB
|
depends on FB
|
||||||
|
@ -1301,7 +1301,7 @@ int fb_validate_mode(const struct fb_var_screeninfo *var, struct fb_info *info)
|
|||||||
-EINVAL : 0;
|
-EINVAL : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_FB_FIRMWARE_EDID) && defined(__i386__)
|
#if defined(CONFIG_FIRMWARE_EDID) && defined(CONFIG_X86)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We need to ensure that the EDID block is only returned for
|
* We need to ensure that the EDID block is only returned for
|
||||||
|
Loading…
Reference in New Issue
Block a user