diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-09-14 08:12:20 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-09-14 08:12:20 -0400 |
commit | 165415f700b0c77fa1f8db6198f48582639adf78 (patch) | |
tree | 088e305b0b5b0c6753072e13be1177824c3ed59d /drivers/video/fbmon.c | |
parent | c324b44c34050cf2a9b58830e11c974806bd85d8 (diff) | |
parent | 2f4ba45a75d6383b4a1201169a808ffea416ffa0 (diff) |
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'drivers/video/fbmon.c')
-rw-r--r-- | drivers/video/fbmon.c | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/drivers/video/fbmon.c b/drivers/video/fbmon.c index c2718bb9494..713226cdf3c 100644 --- a/drivers/video/fbmon.c +++ b/drivers/video/fbmon.c @@ -29,6 +29,7 @@ #include <linux/tty.h> #include <linux/fb.h> #include <linux/module.h> +#include <video/edid.h> #ifdef CONFIG_PPC_OF #include <linux/pci.h> #include <asm/prom.h> @@ -313,11 +314,13 @@ static int edid_is_monitor_block(unsigned char *block) return 0; } -static void calc_mode_timings(int xres, int yres, int refresh, struct fb_videomode *mode) +static void calc_mode_timings(int xres, int yres, int refresh, + struct fb_videomode *mode) { struct fb_var_screeninfo var; struct fb_info info; + memset(&var, 0, sizeof(struct fb_var_screeninfo)); var.xres = xres; var.yres = yres; fb_get_mode(FB_VSYNCTIMINGS | FB_IGNOREMON, @@ -1251,9 +1254,41 @@ int fb_validate_mode(const struct fb_var_screeninfo *var, struct fb_info *info) -EINVAL : 0; } +#if defined(__i386__) +#include <linux/pci.h> + +/* + * We need to ensure that the EDID block is only returned for + * the primary graphics adapter. + */ + +const unsigned char *fb_firmware_edid(struct device *device) +{ + struct pci_dev *dev = NULL; + struct resource *res = NULL; + unsigned char *edid = NULL; + + if (device) + dev = to_pci_dev(device); + + if (dev) + res = &dev->resource[PCI_ROM_RESOURCE]; + + if (res && res->flags & IORESOURCE_ROM_SHADOW) + edid = edid_info.dummy; + + return edid; +} +#else +const unsigned char *fb_firmware_edid(struct device *device) +{ + return NULL; +} +#endif /* _i386_ */ + EXPORT_SYMBOL(fb_parse_edid); EXPORT_SYMBOL(fb_edid_to_monspecs); - +EXPORT_SYMBOL(fb_firmware_edid); EXPORT_SYMBOL(fb_get_mode); EXPORT_SYMBOL(fb_validate_mode); EXPORT_SYMBOL(fb_destroy_modedb); |