From: Adam Jackson Subject: [PATCH] drm/i915/dp: Check DP sink status after training is complete Date: Tue, 14 Feb 2012 14:49:01 -0500 Message-ID: <1329248941-2886-1-git-send-email-ajax@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by gabe.freedesktop.org (Postfix) with ESMTP id 944089E8AF for ; Tue, 14 Feb 2012 11:49:05 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org Cc: peter@colberg.org List-Id: intel-gfx@lists.freedesktop.org This patch is wrong and please do not merge it as is. My hope here is that the sink will actually _tell_ us when it can't sink something. If the bug that prompted this is doing what I think it's doing, then we should see SINK_STATUS fail to light up, and we should then retry link setup at the lower link rate like the spec suggests. Bugzilla: https://bugs.freedesktop.org/45801 Not-signed-off-by: Adam Jackson --- drivers/gpu/drm/i915/intel_dp.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 94f860c..a10775e 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -1271,6 +1271,17 @@ static void intel_dp_commit(struct drm_encoder *encoder) if (HAS_PCH_CPT(dev)) intel_cpt_verify_modeset(dev, intel_crtc->pipe); + + /* check sink status. this doesn't belong here. */ + do { + uint8_t byte; + int ret = intel_dp_aux_native_read(intel_dp, DP_SINK_STATUS, + &byte, 1); + if (ret != 1) + DRM_ERROR("Checking DP sink status failed\n"); + else + DRM_DEBUG_KMS("Sink status after training: %x\n", byte); + } while (0); } static void -- 1.7.7.6