Skip to content

Commit 29e1316

Browse files
committed
drm/i915/tv: Sleep before checking for state changes.
We need to wait for the PLLs to settle prior to detecting the state changes. The BIOS writers guide suggests waiting for the next vblank. Reported-by: Carlos R. Mafra <crmafra2@gmail.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
1 parent 20f0cd5 commit 29e1316

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

drivers/gpu/drm/i915/intel_tv.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,8 +1271,12 @@ intel_tv_detect_type (struct intel_tv *intel_tv)
12711271
I915_WRITE(TV_DAC, tv_dac);
12721272
POSTING_READ(TV_DAC);
12731273

1274+
intel_wait_for_vblank(intel_tv->base.base.dev,
1275+
to_intel_crtc(intel_tv->base.base.crtc)->pipe);
1276+
12741277
type = -1;
12751278
if (wait_for((tv_dac = I915_READ(TV_DAC)) & TVDAC_STATE_CHG, 20) == 0) {
1279+
DRM_DEBUG_KMS("TV detected: %x, %x\n", tv_ctl, tv_dac);
12761280
/*
12771281
* A B C
12781282
* 0 1 1 Composite
@@ -1289,8 +1293,7 @@ intel_tv_detect_type (struct intel_tv *intel_tv)
12891293
DRM_DEBUG_KMS("Detected Component TV connection\n");
12901294
type = DRM_MODE_CONNECTOR_Component;
12911295
} else {
1292-
DRM_DEBUG_KMS("Unrecognised TV connection: %x\n",
1293-
tv_dac);
1296+
DRM_DEBUG_KMS("Unrecognised TV connection\n");
12941297
}
12951298
}
12961299

0 commit comments

Comments
 (0)