Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfac4d67 authored by Zhao Yakui's avatar Zhao Yakui Committed by Eric Anholt
Browse files

drm/i915: Ignore LVDS EDID when it is unavailabe or invalid

This trys to shut up complains about invalid LVDS EDID during
mode probe, but uses fixed panel mode directly for panels with
broken EDID.

https://bugs.freedesktop.org/show_bug.cgi?id=23099
https://bugs.freedesktop.org/show_bug.cgi?id=26395



Signed-off-by: default avatarZhao Yakui <yakui.zhao@intel.com>
Tested-by: default avatarSitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 9875557e
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -611,6 +611,8 @@ typedef struct drm_i915_private {
	/* Reclocking support */
	/* Reclocking support */
	bool render_reclock_avail;
	bool render_reclock_avail;
	bool lvds_downclock_avail;
	bool lvds_downclock_avail;
	/* indicate whether the LVDS EDID is OK */
	bool lvds_edid_good;
	/* indicates the reduced downclock for LVDS*/
	/* indicates the reduced downclock for LVDS*/
	int lvds_downclock;
	int lvds_downclock;
	struct work_struct idle_work;
	struct work_struct idle_work;
+9 −4
Original line number Original line Diff line number Diff line
@@ -638,10 +638,12 @@ static int intel_lvds_get_modes(struct drm_connector *connector)
	struct drm_i915_private *dev_priv = dev->dev_private;
	struct drm_i915_private *dev_priv = dev->dev_private;
	int ret = 0;
	int ret = 0;


	if (dev_priv->lvds_edid_good) {
		ret = intel_ddc_get_modes(intel_encoder);
		ret = intel_ddc_get_modes(intel_encoder);


		if (ret)
		if (ret)
			return ret;
			return ret;
	}


	/* Didn't get an EDID, so
	/* Didn't get an EDID, so
	 * Set wide sync ranges so we get all modes
	 * Set wide sync ranges so we get all modes
@@ -1062,7 +1064,10 @@ void intel_lvds_init(struct drm_device *dev)
	 * Attempt to get the fixed panel mode from DDC.  Assume that the
	 * Attempt to get the fixed panel mode from DDC.  Assume that the
	 * preferred mode is the right one.
	 * preferred mode is the right one.
	 */
	 */
	intel_ddc_get_modes(intel_encoder);
	dev_priv->lvds_edid_good = true;

	if (!intel_ddc_get_modes(intel_encoder))
		dev_priv->lvds_edid_good = false;


	list_for_each_entry(scan, &connector->probed_modes, head) {
	list_for_each_entry(scan, &connector->probed_modes, head) {
		mutex_lock(&dev->mode_config.mutex);
		mutex_lock(&dev->mode_config.mutex);