[Intel-gfx] [RFC PATCH 4/5] DRM/I915: Use the child device to decide whether the LVDS should be intialized
Adam Jackson
ajax at redhat.com
Tue Nov 17 16:47:58 CET 2009
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.
> @@ -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.
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20091117/9c9827be/attachment.sig>
More information about the Intel-gfx
mailing list