|
From: Antonino D. <ad...@po...> - 2003-03-11 12:53:04
|
Hi, I was wondering how to get the EDID block, and my first thought was to implement DDC. But it is tricky to implement, so why not just get the EDID using an int 0x10 BIOS call? The EDID block can be read before the kernel goes into protected mode (just a short assembly code in arch/i386/boot/video.S) and this can be saved later on as struct edid_info during the kernel's setup routine. One catch though is that that the "empty_zero_page" is becoming too tight, so it will just use the same offset used by the EDD (BIOS Enhanced Disk Drive). So EDID reading will be disabled if EDD is enabled under the "Processor Type and Features" option. Then, we can also make EDID parsing more powerful. I've added some code in fbmon.c to parse the EDID block in more detail. It should be able to parse almost everything (except the color point). Currently, it just prints all the information it can find. However, I haven't tested if parsing the Detailed Monitor information is correct since the EDID block of the monitor I'm using is incomplete. One of the goals is to build a video data structure that also includes a database of video mode in fb_videomode format. This can be dynamically created per device using the supported VESA modes, manufacturer's mode and detailed timings mode information in the EDID block. The EDID block also contain information on GTF capability. With these types of displays, a video mode mode database may not be needed since all possible supported modelines can be calculated. The advantage of the above is that the driver can switch to different modes without relying on user input (of course, user-entered modelines are still preferred). Anyway, I need help in testing the code (especially the Detailed Information part). Just apply the attached patch, disable Enhanced Disk Driver support (under Processor Type and Features), and enable EDID support (under Graphics option). Finally, add the following line to the fbdev driver that you use (anywhere, but a good place is the init code): show_edid(get_EDID(pci_dev)) If using an x86 machine show_edid(get_EDID(NULL)) should also work. Reboot, check dmesg, and kindly post the ouput. Thanks. Tony PS: The patch is against linux-2.5.64 + fbdev.diff.gz |