Re: [PATCH] retrieve VBE EDID/DDC info independent of used videomode

From: H. Peter Anvin
Date: Sun Jul 08 2007 - 20:56:05 EST


Daniel Drake wrote:
>
> 2.6.22-rc6-mm1 has the same problem (it is not fixed there).
>

I believe this patch should fix it for 2.6.22-rc6-mm1. I will check
this into the newsetup tree.

-hpa
diff --git a/arch/i386/boot/video-vesa.c b/arch/i386/boot/video-vesa.c
index 3c21bd7..e6aa9eb 100644
--- a/arch/i386/boot/video-vesa.c
+++ b/arch/i386/boot/video-vesa.c
@@ -28,7 +28,7 @@ static void vesa_store_mode_params_graphics(void);

static int vesa_probe(void)
{
-#ifdef CONFIG_VIDEO_VESA
+#if defined(CONFIG_VIDEO_VESA) || defined(CONFIG_FIRMWARE_EDID)
u16 ax;
u16 mode;
addr_t mode_ptr;
@@ -47,7 +47,8 @@ static int vesa_probe(void)
vginfo.signature != VESA_MAGIC ||
vginfo.version < 0x0102)
return 0; /* Not present */
-
+#endif /* CONFIG_VIDEO_VESA || CONFIG_FIRMWARE_EDID */
+#ifdef CONFIG_VIDEO_VESA
set_fs(vginfo.video_mode_ptr.seg);
mode_ptr = vginfo.video_mode_ptr.off;

@@ -96,7 +97,7 @@ static int vesa_probe(void)
return nmodes;
#else
return 0;
-#endif
+#endif /* CONFIG_VIDEO_VESA */
}

static int vesa_set_mode(struct mode_info *mode)