drm/i915: Don't add panel_fixed_mode to the probed modes list at LVDS init.
authorSteve Aarnio <steve.j.aarnio@linux.intel.com>
Thu, 12 Feb 2009 19:34:02 +0000 (11:34 -0800)
committerDave Airlie <airlied@redhat.com>
Fri, 20 Feb 2009 02:21:12 +0000 (12:21 +1000)
In the case where no EDID data is read from the device, adding the
panel_fixed_mode pointer to the probed modes list causes data corruption.

If the panel_fixed_mode pointer is added to the probed modes list at
init time, a copy of the mode is added again at drm_get_modes() request
time.  Then, the panel_fixed_mode pointer is freed because it is seen as
a duplicate mode.  Unfortunately, this pointer is still stored and used
in mode_fixup().

Because the panel_fixed_mode data is copied and returned at
drm_get_modes() time, it is unnecessary to add this information at init
time.

Signed-off-by: Steve Aarnio <steve.j.aarnio@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Airlie <airlied@linux.ie>
drivers/gpu/drm/i915/intel_lvds.c

index 6d4f9126535443366debd7b0f769bcc9c2dceb31..0d211af98854c18debd6af4f1ea6a246af16871d 100644 (file)
@@ -481,8 +481,6 @@ void intel_lvds_init(struct drm_device *dev)
                if (dev_priv->panel_fixed_mode) {
                        dev_priv->panel_fixed_mode->type |=
                                DRM_MODE_TYPE_PREFERRED;
-                       drm_mode_probed_add(connector,
-                                           dev_priv->panel_fixed_mode);
                        goto out;
                }
        }