On Wed, 10 Nov 2010, Paul Mundt wrote: > On Tue, Nov 02, 2010 at 11:47:47AM +0100, Guennadi Liakhovetski wrote: > > --- a/drivers/video/sh_mobile_hdmi.c > > +++ b/drivers/video/sh_mobile_hdmi.c > > @@ -750,7 +753,38 @@ static int sh_hdmi_read_edid(struct sh_hdmi *hdmi, unsigned long *hdmi_rate, > > printk(KERN_CONT "\n"); > > #endif > > > > - fb_edid_to_monspecs(edid, &hdmi->monspec); > > + if (!hdmi->edid_blocks) { > > + fb_edid_to_monspecs(edid, &hdmi->monspec); > > + hdmi->edid_blocks = edid[126] + 1; > > + > > + dev_dbg(hdmi->dev, "%d main modes, %d extension blocks\n", > > + hdmi->monspec.modedb_len, hdmi->edid_blocks - 1); > > + } else { > > + dev_dbg(hdmi->dev, "Extension %u detected, DTD start %u\n", > > + edid[0], edid[2]); > > + fb_edid_add_monspecs(edid, &hdmi->monspec); > > + } > > + > Assuming fb_edid_add_monspecs() is changed to hand error values back, > this would probably benefit from being inverted. The fb_edid_to_monspecs() > case looks like a reasonable fallback if fb_did_add_monspecs() fails. Sorry, I think, there is a confusion here. I don't think fb_edid_to_monspecs() can in any case be a fallback from fb_edid_add_monspecs(). The former is only good for the _first_ EDID segment, whereas the latter shall be used on the following segments. They cannot be applied to the same EDID data. Thanks Guennadi --- Guennadi Liakhovetski, Ph.D. Freelance Open-Source Software Developer http://www.open-technology.de/ -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html