aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/savage/savagefb-i2c.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2005-09-09 16:04:35 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:59 -0400
commit13776711ce4b234b5ad153e55e8b5d6703c6b1ef (patch)
tree478de15a8709545fab36ca1d60cf7ab09018eacd /drivers/video/savage/savagefb-i2c.c
parent5e518d7672dea4cd7c60871e40d0490c52f01d13 (diff)
[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.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c
index 847698b5cfe7..959404ad68f4 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)
259 return buf; 259 return buf;
260} 260}
261 261
262int savagefb_probe_i2c_connector(struct savagefb_par *par, u8 **out_edid) 262int savagefb_probe_i2c_connector(struct fb_info *info, u8 **out_edid)
263{ 263{
264 struct savagefb_par *par = info->par;
264 u8 *edid = NULL; 265 u8 *edid = NULL;
265 int i; 266 int i;
266 267
@@ -270,12 +271,19 @@ int savagefb_probe_i2c_connector(struct savagefb_par *par, u8 **out_edid)
270 if (edid) 271 if (edid)
271 break; 272 break;
272 } 273 }
274
275 if (!edid) {
276 /* try to get from firmware */
277 edid = kmalloc(EDID_LENGTH, GFP_KERNEL);
278 if (edid)
279 memcpy(edid, fb_firmware_edid(info->device),
280 EDID_LENGTH);
281 }
282
273 if (out_edid) 283 if (out_edid)
274 *out_edid = edid; 284 *out_edid = edid;
275 if (!edid)
276 return 1;
277 285
278 return 0; 286 return (edid) ? 0 : 1;
279} 287}
280 288
281MODULE_LICENSE("GPL"); 289MODULE_LICENSE("GPL");