From patchwork Fri Aug 3 18:10:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan-Marek Glogowski X-Patchwork-Id: 10555577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B9E201390 for ; Sat, 4 Aug 2018 00:38:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9E3A92BEED for ; Sat, 4 Aug 2018 00:38:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8FDB32BF9F; Sat, 4 Aug 2018 00:38:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A69852BEED for ; Sat, 4 Aug 2018 00:38:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7B9B989B05; Sat, 4 Aug 2018 00:38:07 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org X-Greylist: delayed 603 seconds by postgrey-1.36 at gabe; Fri, 03 Aug 2018 18:21:12 UTC Received: from ironboyv.h-da.de (ironboyv.h-da.de [141.100.10.230]) by gabe.freedesktop.org (Postfix) with ESMTPS id 004CA6E0E1 for ; Fri, 3 Aug 2018 18:21:12 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2HmCwBQmmRb/2soZI1cHAEBAQQBAQoBAYNOYwN8KIN/iAmMRU8DBoEIlguBei6HWiE0GAECAQECAQECAgJpHAxCEAGEZQEpBHoEAwECAwImAlEbBgIBAYMcAYFyEQuyKnszGgKKNwWBC4d+F3mBB4ESJ4YGBBiESIJVAod7hTOMfwl8hR2JJYg3BRMDhUwBimSJMzmBUk0kFIMkgk2ISIVAbQGGXIlpAQE X-IPAS-Result: A2HmCwBQmmRb/2soZI1cHAEBAQQBAQoBAYNOYwN8KIN/iAmMRU8DBoEIlguBei6HWiE0GAECAQECAQECAgJpHAxCEAGEZQEpBHoEAwECAwImAlEbBgIBAYMcAYFyEQuyKnszGgKKNwWBC4d+F3mBB4ESJ4YGBBiESIJVAod7hTOMfwl8hR2JJYg3BRMDhUwBimSJMzmBUk0kFIMkgk2ISIVAbQGGXIlpAQE Received: from unknown (HELO mail.fbihome.de) ([141.100.40.107]) by ironboyv.h-da.de with ESMTP; 03 Aug 2018 20:10:52 +0200 Received: from [172.16.2.202] (unknown [194.113.41.246]) by mail.fbihome.de (Postfix) with ESMTPSA id 4B78C42215 for ; Fri, 3 Aug 2018 20:10:53 +0200 (CEST) To: intel-gfx@lists.freedesktop.org From: Jan-Marek Glogowski Openpgp: preference=signencrypt Autocrypt: addr=glogow@fbihome.de; prefer-encrypt=mutual; keydata= mQGiBEDrcVsRBACdQcj/8k2CSP+5frReJ2y7AAs4+3nBKPg08yOAsdcyQJAPbRGO8r1wJ6lb fnJI8+y8uvmsdQ83P4262EqpShHCpI7ioPUopkAKW5dWp/NM+YjYK0m3kMI03HlHeHKAMjyc pUmFu0sHktbDwrDUxTksgkcRHU1bbcyVuR7yaPbpdwCgoUn/Fthp7RItKuCLktKop6BcQbsE AIXM5gjo5C6l7I2tXFuO1+4boEwmL2WnGFEawFB4gBaBBJ6zUHzikdZW/5WHCUalSKRd38Bi PW2buoftYwIjuoRj30+YEVZ/2/oZsREcIazUeZzXaP2Emr/2rRNugj5KDPfgh6v6F9+Ravkw z6Bixv1lti7DoP32c7oDwggJEH6LA/0UVRt4RL3gO5Dcz+KIwOVrviZCKYB6/XSMfoAUDwne KhnYeQCB2ylV4O/bMrHz3dkNKHfgZ6SbMFJdAmCD1Vey0819jsh/CLCz9vp2wr5IzpTanL7y XYjj9R/qpDaW00LZF3+Maqavi3JKAi7K0CjnbcVfV65Rm/Qs1cfrsKQTf7QnSmFuLU1hcmVr IEdsb2dvd3NraSA8Z2xvZ293QGZiaWhvbWUuZGU+iFsEExECABsFAkDrcVsGCwkIBwMCAxUC AwMWAgECHgECF4AACgkQj6MK58wZA3cK/gCfb8IUFtgcxPSuAH1w8hn4C5WuSsUAn1P1Amys nLextO0t3xDDrFWO3PFhuQENBEDrcV0QBADpsD+yR9/1FEKKDGq7Q+jyz7or/SEwuCG/kHk3 G+ynZYQzFEQ0cWBw0QFzNUNnwVAvG22M0UDjBn8v7BBH0ZtlrqVRUx++6uVv5dlj1uuBp1gp cpAHSQgmcXxN4xYSwdJ7fPbMeAkf+8IZc99xG2geF3uZNwzPxVFBHhP7zIZqIwADBQP8D5PU ZfoGLr3lDFqhoj6Z6sz9wrqWBC0+zjFcCBaoK4C9x7wxIyBJVRe+yhucLlxQt+LrrU9uQjlT YeHqkIL96Xp3KN4y2pr98bzMEF6uIifTEpZs+D+Jq1VvUiJiVUnw0EuCTzmds7tm9CMkOXcH hs7GRsJSHXRSWqsXZUec3muIRgQYEQIABgUCQOtxXQAKCRCPowrnzBkDd02+AJ0caVX6EEut 2yzgPx9/lndIHGYlhgCfXy/f9ENFxfAxMlLXjTvDUe9qye8= Message-ID: <01e90c34-a95e-73ba-f9af-c6f3310c4f4d@fbihome.de> Date: Fri, 3 Aug 2018 20:10:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Language: en-US X-Mailman-Approved-At: Sat, 04 Aug 2018 00:38:05 +0000 Subject: [Intel-gfx] [PATCH] drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse" X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP The same patch and various dmesg output is attached to https://bugs.freedesktop.org/show_bug.cgi?id=107446 "Monitor on 2nd DisplayPort is not initialized" I have no idea, if this patch is correct, but it fixes my problem of the "bricked" monitor. Jan-Marek --- From edf159ae0426d9c90bf974629d83dc50c002bc52 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Fri, 3 Aug 2018 15:30:55 +0000 Subject: [PATCH] drm/i915: Re-apply "Perform link quality check unconditionally during long pulse" This re-applies the workaround for "some DP sinks, [which] are a little nuts" from commit 1a36147bb939 ("drm/i915: Perform link quality check unconditionally during long pulse"). It makes the secondary AOC E2460P monitor connected via DP to an acer Veriton N4640G usable again. This hunk was dropped in commit c85d200e8321 ("drm/i915: Move SST DP link retraining into the ->post_hotplug() hook") Signed-off-by: Jan-Marek Glogowski --- drivers/gpu/drm/i915/intel_dp.c | 46 ++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 153342c..796c2a2 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4294,18 +4294,6 @@ intel_dp_needs_link_retrain(struct intel_dp *intel_dp) return !drm_dp_channel_eq_ok(link_status, intel_dp->lane_count); } -/* - * If display is now connected check links status, - * there has been known issues of link loss triggering - * long pulse. - * - * Some sinks (eg. ASUS PB287Q) seem to perform some - * weird HPD ping pong during modesets. So we can apparently - * end up with HPD going low during a modeset, and then - * going back up soon after. And once that happens we must - * retrain the link to get a picture. That's in case no - * userspace component reacted to intermittent HPD dip. - */ int intel_dp_retrain_link(struct intel_encoder *encoder, struct drm_modeset_acquire_ctx *ctx) { @@ -4322,10 +4310,12 @@ int intel_dp_retrain_link(struct intel_encoder *encoder, if (!connector || connector->base.status != connector_status_connected) return 0; - ret = drm_modeset_lock(&dev_priv->drm.mode_config.connection_mutex, - ctx); - if (ret) - return ret; + if (ctx) { + ret = drm_modeset_lock( + &dev_priv->drm.mode_config.connection_mutex, ctx); + if (ret) + return ret; + } conn_state = connector->base.state; @@ -4333,9 +4323,11 @@ int intel_dp_retrain_link(struct intel_encoder *encoder, if (!crtc) return 0; - ret = drm_modeset_lock(&crtc->base.mutex, ctx); - if (ret) - return ret; + if (ctx) { + ret = drm_modeset_lock(&crtc->base.mutex, ctx); + if (ret) + return ret; + } crtc_state = to_intel_crtc_state(crtc->base.state); @@ -4854,6 +4846,22 @@ intel_dp_long_pulse(struct intel_connector *connector) */ status = connector_status_disconnected; goto out; + } else { + /* + * If display is now connected check links status, + * there has been known issues of link loss triggering + * long pulse. + * + * Some sinks (eg. ASUS PB287Q) seem to perform some + * weird HPD ping pong during modesets. So we can apparently + * end up with HPD going low during a modeset, and then + * going back up soon after. And once that happens we must + * retrain the link to get a picture. That's in case no + * userspace component reacted to intermittent HPD dip. + */ + struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; + + intel_dp_retrain_link(encoder, NULL); } /*