diff options
-rw-r--r-- | arch/i386/boot/video.S | 19 | ||||
-rw-r--r-- | arch/x86_64/boot/video.S | 19 | ||||
-rw-r--r-- | arch/x86_64/kernel/setup.c | 1 | ||||
-rw-r--r-- | drivers/video/Kconfig | 31 | ||||
-rw-r--r-- | drivers/video/fbmon.c | 2 |
5 files changed, 54 insertions, 18 deletions
diff --git a/arch/i386/boot/video.S b/arch/i386/boot/video.S index c9343c3a8082..8c2a6faeeae5 100644 --- a/arch/i386/boot/video.S +++ b/arch/i386/boot/video.S | |||
@@ -1929,7 +1929,7 @@ skip10: movb %ah, %al | |||
1929 | ret | 1929 | ret |
1930 | 1930 | ||
1931 | store_edid: | 1931 | store_edid: |
1932 | #ifdef CONFIG_FB_FIRMWARE_EDID | 1932 | #ifdef CONFIG_FIRMWARE_EDID |
1933 | pushw %es # just save all registers | 1933 | pushw %es # just save all registers |
1934 | pushw %ax | 1934 | pushw %ax |
1935 | pushw %bx | 1935 | pushw %bx |
@@ -1947,6 +1947,22 @@ store_edid: | |||
1947 | rep | 1947 | rep |
1948 | stosl | 1948 | stosl |
1949 | 1949 | ||
1950 | pushw %es # save ES | ||
1951 | xorw %di, %di # Report Capability | ||
1952 | pushw %di | ||
1953 | popw %es # ES:DI must be 0:0 | ||
1954 | movw $0x4f15, %ax | ||
1955 | xorw %bx, %bx | ||
1956 | xorw %cx, %cx | ||
1957 | int $0x10 | ||
1958 | popw %es # restore ES | ||
1959 | |||
1960 | cmpb $0x00, %ah # call successful | ||
1961 | jne no_edid | ||
1962 | |||
1963 | cmpb $0x4f, %al # function supported | ||
1964 | jne no_edid | ||
1965 | |||
1950 | movw $0x4f15, %ax # do VBE/DDC | 1966 | movw $0x4f15, %ax # do VBE/DDC |
1951 | movw $0x01, %bx | 1967 | movw $0x01, %bx |
1952 | movw $0x00, %cx | 1968 | movw $0x00, %cx |
@@ -1954,6 +1970,7 @@ store_edid: | |||
1954 | movw $0x140, %di | 1970 | movw $0x140, %di |
1955 | int $0x10 | 1971 | int $0x10 |
1956 | 1972 | ||
1973 | no_edid: | ||
1957 | popw %di # restore all registers | 1974 | popw %di # restore all registers |
1958 | popw %dx | 1975 | popw %dx |
1959 | popw %cx | 1976 | popw %cx |
diff --git a/arch/x86_64/boot/video.S b/arch/x86_64/boot/video.S index 32327bb37aff..2aa565c136e5 100644 --- a/arch/x86_64/boot/video.S +++ b/arch/x86_64/boot/video.S | |||
@@ -1929,6 +1929,7 @@ skip10: movb %ah, %al | |||
1929 | ret | 1929 | ret |
1930 | 1930 | ||
1931 | store_edid: | 1931 | store_edid: |
1932 | #ifdef CONFIG_FIRMWARE_EDID | ||
1932 | pushw %es # just save all registers | 1933 | pushw %es # just save all registers |
1933 | pushw %ax | 1934 | pushw %ax |
1934 | pushw %bx | 1935 | pushw %bx |
@@ -1946,6 +1947,22 @@ store_edid: | |||
1946 | rep | 1947 | rep |
1947 | stosl | 1948 | stosl |
1948 | 1949 | ||
1950 | pushw %es # save ES | ||
1951 | xorw %di, %di # Report Capability | ||
1952 | pushw %di | ||
1953 | popw %es # ES:DI must be 0:0 | ||
1954 | movw $0x4f15, %ax | ||
1955 | xorw %bx, %bx | ||
1956 | xorw %cx, %cx | ||
1957 | int $0x10 | ||
1958 | popw %es # restore ES | ||
1959 | |||
1960 | cmpb $0x00, %ah # call successful | ||
1961 | jne no_edid | ||
1962 | |||
1963 | cmpb $0x4f, %al # function supported | ||
1964 | jne no_edid | ||
1965 | |||
1949 | movw $0x4f15, %ax # do VBE/DDC | 1966 | movw $0x4f15, %ax # do VBE/DDC |
1950 | movw $0x01, %bx | 1967 | movw $0x01, %bx |
1951 | movw $0x00, %cx | 1968 | movw $0x00, %cx |
@@ -1953,12 +1970,14 @@ store_edid: | |||
1953 | movw $0x140, %di | 1970 | movw $0x140, %di |
1954 | int $0x10 | 1971 | int $0x10 |
1955 | 1972 | ||
1973 | no_edid: | ||
1956 | popw %di # restore all registers | 1974 | popw %di # restore all registers |
1957 | popw %dx | 1975 | popw %dx |
1958 | popw %cx | 1976 | popw %cx |
1959 | popw %bx | 1977 | popw %bx |
1960 | popw %ax | 1978 | popw %ax |
1961 | popw %es | 1979 | popw %es |
1980 | #endif | ||
1962 | ret | 1981 | ret |
1963 | 1982 | ||
1964 | # VIDEO_SELECT-only variables | 1983 | # VIDEO_SELECT-only variables |
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index fb850b52b4da..143c65031539 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c | |||
@@ -109,6 +109,7 @@ struct sys_desc_table_struct { | |||
109 | }; | 109 | }; |
110 | 110 | ||
111 | struct edid_info edid_info; | 111 | struct edid_info edid_info; |
112 | EXPORT_SYMBOL_GPL(edid_info); | ||
112 | struct e820map e820; | 113 | struct e820map e820; |
113 | 114 | ||
114 | extern int root_mountflags; | 115 | extern int root_mountflags; |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 90cd5587d4e3..2a265e1c7cbc 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -4,6 +4,21 @@ | |||
4 | 4 | ||
5 | menu "Graphics support" | 5 | menu "Graphics support" |
6 | 6 | ||
7 | config FIRMWARE_EDID | ||
8 | bool "Enable firmware EDID" | ||
9 | default y | ||
10 | ---help--- | ||
11 | This enables access to the EDID transferred from the firmware. | ||
12 | On the i386, this is from the Video BIOS. Enable this if DDC/I2C | ||
13 | transfers do not work for your driver and if you are using | ||
14 | nvidiafb, i810fb or savagefb. | ||
15 | |||
16 | In general, choosing Y for this option is safe. If you | ||
17 | experience extremely long delays while booting before you get | ||
18 | something on your display, try setting this to N. Matrox cards in | ||
19 | combination with certain motherboards and monitors are known to | ||
20 | suffer from this problem. | ||
21 | |||
7 | config FB | 22 | config FB |
8 | tristate "Support for frame buffer devices" | 23 | tristate "Support for frame buffer devices" |
9 | ---help--- | 24 | ---help--- |
@@ -70,22 +85,6 @@ config FB_MACMODES | |||
70 | depends on FB | 85 | depends on FB |
71 | default n | 86 | default n |
72 | 87 | ||
73 | config FB_FIRMWARE_EDID | ||
74 | bool "Enable firmware EDID" | ||
75 | depends on FB | ||
76 | default y | ||
77 | ---help--- | ||
78 | This enables access to the EDID transferred from the firmware. | ||
79 | On the i386, this is from the Video BIOS. Enable this if DDC/I2C | ||
80 | transfers do not work for your driver and if you are using | ||
81 | nvidiafb, i810fb or savagefb. | ||
82 | |||
83 | In general, choosing Y for this option is safe. If you | ||
84 | experience extremely long delays while booting before you get | ||
85 | something on your display, try setting this to N. Matrox cards in | ||
86 | combination with certain motherboards and monitors are known to | ||
87 | suffer from this problem. | ||
88 | |||
89 | config FB_BACKLIGHT | 88 | config FB_BACKLIGHT |
90 | bool | 89 | bool |
91 | depends on FB | 90 | depends on FB |
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index 87b0224d2347..3ccfff715a51 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c | |||
@@ -1301,7 +1301,7 @@ int fb_validate_mode(const struct fb_var_screeninfo *var, struct fb_info *info) | |||
1301 | -EINVAL : 0; | 1301 | -EINVAL : 0; |
1302 | } | 1302 | } |
1303 | 1303 | ||
1304 | #if defined(CONFIG_FB_FIRMWARE_EDID) && defined(__i386__) | 1304 | #if defined(CONFIG_FIRMWARE_EDID) && defined(CONFIG_X86) |
1305 | 1305 | ||
1306 | /* | 1306 | /* |
1307 | * We need to ensure that the EDID block is only returned for | 1307 | * We need to ensure that the EDID block is only returned for |