Commit 2bf71160 authored by Keith Packard's avatar Keith Packard
Browse files

drm/i915: TVDAC_STATE_CHG does not indicate successful load-detect



Do not use this bit to indicate that load detection has completed,
instead just wait for vblank, at which point the load registers will
have been updated.

Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
Tested-by: default avatarYi Sun <yi.sun@intel.com>
parent 835bff7e
Loading
Loading
Loading
Loading
+20 −20
Original line number Diff line number Diff line
@@ -1283,7 +1283,7 @@ intel_tv_detect_type (struct intel_tv *intel_tv,
			      to_intel_crtc(intel_tv->base.base.crtc)->pipe);

	type = -1;
	if (wait_for((tv_dac = I915_READ(TV_DAC)) & TVDAC_STATE_CHG, 20) == 0) {
	tv_dac = I915_READ(TV_DAC);
	DRM_DEBUG_KMS("TV detected: %x, %x\n", tv_ctl, tv_dac);
	/*
	 *  A B C
@@ -1302,7 +1302,7 @@ intel_tv_detect_type (struct intel_tv *intel_tv,
		type = DRM_MODE_CONNECTOR_Component;
	} else {
		DRM_DEBUG_KMS("Unrecognised TV connection\n");
		}
		type = -1;
	}

	I915_WRITE(TV_DAC, save_tv_dac & ~TVDAC_STATE_CHG_EN);