[Intel-gfx] [RFC PATCH 4/5] DRM/I915: Use the child device to decide whether the LVDS should be intialized

ykzhao yakui.zhao at intel.com
Wed Nov 18 03:39:53 CET 2009


On Tue, 2009-11-17 at 23:47 +0800, Adam Jackson wrote:
> On Tue, 2009-11-17 at 15:43 +0800, yakui.zhao at intel.com wrote:
> 
> > +int lvds_is_present_in_vbt(struct drm_device *dev)
> > +{
> > +	struct drm_i915_private *dev_priv = dev->dev_private;
> > +	struct child_device_config *p_child;
> > +	int i, ret;
> > +
> > +	if (!dev_priv->child_dev_num)
> > +		return 1;
> > +
> > +	ret = 0;
> > +	for (i = 0; i < dev_priv->child_dev_num; i++) {
> > +		p_child = dev_priv->child_dev + i;
> > +		/*
> > +		 * If the device type is not LFP, continue.
> > +		 */
> > +		if (p_child->device_type != INT_LFP_CLASS)
> > +			continue;
> 
> Not that I have ROMs to prove this, but I see a whole bunch of other LFP
> DEVICE_TYPE defines in intel_bios.h.  I suspect we should treat them the
> same.
Can you send me the vbios.dump on your box so that we can check whether
it can work?
> 
> > @@ -936,6 +974,10 @@ void intel_lvds_init(struct drm_device *dev)
> >  	if (dmi_check_system(intel_no_lvds))
> >  		return;
> >  
> > +	if (!lvds_is_present_in_vbt(dev)) {
> > +		DRM_DEBUG_KMS("LVDS is not present in VBT\n");
> > +		return;
> > +	}
> >  	/* Assume that any device without an ACPI LID device also doesn't
> >  	 * have an integrated LVDS.  We would be better off parsing the BIOS
> >  	 * to get a reliable indicator, but that code isn't written yet.
> 
> The juxtaposition between code and comment here is pretty funny.
> Therefore I'm reasonably sure it's wrong.
The above comment is not related with this patch. It is the comment
about the patch that uses the LID device to check whether the LVDS is
present.
> 
> - ajax




More information about the Intel-gfx mailing list