diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2005-09-09 13:04:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 13:57:59 -0700 |
commit | 13776711ce4b234b5ad153e55e8b5d6703c6b1ef (patch) | |
tree | 478de15a8709545fab36ca1d60cf7ab09018eacd /drivers/video/savage/savagefb-i2c.c | |
parent | 5e518d7672dea4cd7c60871e40d0490c52f01d13 (diff) | |
download | kernel_goldelico_gta04-13776711ce4b234b5ad153e55e8b5d6703c6b1ef.zip kernel_goldelico_gta04-13776711ce4b234b5ad153e55e8b5d6703c6b1ef.tar.gz kernel_goldelico_gta04-13776711ce4b234b5ad153e55e8b5d6703c6b1ef.tar.bz2 |
[PATCH] savagefb: Driver updates
- Fallback to firmware EDID if chipset has no DDC/I2C support or if I2C
probing failed
- Add fb_blank hook
- Fix savagefb_suspend/resume to enable driver to successfully suspend and
resume from S3, memory or disk
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/savage/savagefb-i2c.c')
-rw-r--r-- | drivers/video/savage/savagefb-i2c.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c index 847698b..959404a 100644 --- a/drivers/video/savage/savagefb-i2c.c +++ b/drivers/video/savage/savagefb-i2c.c @@ -259,8 +259,9 @@ static u8 *savage_do_probe_i2c_edid(struct savagefb_i2c_chan *chan) return buf; } -int savagefb_probe_i2c_connector(struct savagefb_par *par, u8 **out_edid) +int savagefb_probe_i2c_connector(struct fb_info *info, u8 **out_edid) { + struct savagefb_par *par = info->par; u8 *edid = NULL; int i; @@ -270,12 +271,19 @@ int savagefb_probe_i2c_connector(struct savagefb_par *par, u8 **out_edid) if (edid) break; } + + if (!edid) { + /* try to get from firmware */ + edid = kmalloc(EDID_LENGTH, GFP_KERNEL); + if (edid) + memcpy(edid, fb_firmware_edid(info->device), + EDID_LENGTH); + } + if (out_edid) *out_edid = edid; - if (!edid) - return 1; - return 0; + return (edid) ? 0 : 1; } MODULE_LICENSE("GPL"); |