Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8213
b: refs/heads/master
c: 5e518d7
h: refs/heads/master
i:
  8211: 2954dff
v: v3
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Sep 9, 2005
1 parent dc85095 commit 0dbaf60
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 53eed4ec8bcd8701b9135859ec46b10a0d88ba25
refs/heads/master: 5e518d7672dea4cd7c60871e40d0490c52f01d13
2 changes: 1 addition & 1 deletion trunk/arch/i386/boot/video.S
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,7 @@ store_edid:
movw $0x4f15, %ax # do VBE/DDC
movw $0x01, %bx
movw $0x00, %cx
movw $0x01, %dx
movw $0x00, %dx
movw $0x140, %di
int $0x10

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/i386/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ struct sys_desc_table_struct {
unsigned char table[0];
};
struct edid_info edid_info;
EXPORT_SYMBOL_GPL(edid_info);
struct ist_info ist_info;
#if defined(CONFIG_X86_SPEEDSTEP_SMI) || \
defined(CONFIG_X86_SPEEDSTEP_SMI_MODULE)
Expand Down
35 changes: 34 additions & 1 deletion trunk/drivers/video/fbmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -1251,9 +1252,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);
4 changes: 3 additions & 1 deletion trunk/include/linux/fb.h
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,9 @@ extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var,
extern int fb_validate_mode(const struct fb_var_screeninfo *var,
struct fb_info *info);
extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var);
extern void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs);
extern const unsigned char *fb_firmware_edid(struct device *device);
extern void fb_edid_to_monspecs(unsigned char *edid,
struct fb_monspecs *specs);
extern void fb_destroy_modedb(struct fb_videomode *modedb);

/* drivers/video/modedb.c */
Expand Down

0 comments on commit 0dbaf60

Please sign in to comment.