Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp740586imm; Thu, 13 Sep 2018 07:05:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaIhv8hPGjMgIXbjt8D/DPLV2fLSuFUJkYnuPife6Z8AmcvweDhZq2OHsRYtloTGXMyUd3F X-Received: by 2002:a17:902:8481:: with SMTP id c1-v6mr7530220plo.177.1536847542100; Thu, 13 Sep 2018 07:05:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847542; cv=none; d=google.com; s=arc-20160816; b=QaagFvcWm+WLOzjEKrQbSMSuxx/YsKaNY8gi3KsDcTM2TJWk8/N3ggTzS1Q9oV1WqF Myp911XShtVE7vC1rpL3y7s2iJYQtxWhqmojbQCiSlukR7nmIPQ6diGq9jHxw5MqchkJ dHcOOJu3Lic96noS3EiO6L06i+VwvmULk+8PzKFVEHqMW8Jf7GNgJbjDX0HwJKylpEEU yaqp41W/8H+i5WXbrX3Sbe5PsQD3/YP3OC6vuh1dlvUz+7tFOAXAcXGncWd7Xuxnz6YB CdzNJN3zZduWHbxtzCoIC0nlYHBVXU2GDhPoQUANTh9j1kOBEyDiGSit5BOE2SqayzNL Qkcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=2im9QMBwj+t5Zuj+c6U1qT+apUT+0RJ6N6wtkYkRkfE=; b=dVMmRTXp7I1Py0et2voSZfpnkHAp73AlUxF/pT2Ih+cmvE7kAJQAZbova0+Kcp3O0o DBqwJ491CR9qUHU+9gz/2zKS1pFo1/pONJj9P5Jkfvnm00bEKpmI34ojq25BH1tjV1I9 gUijtqFJDegVAiLn+ZBN45Kl5gDJvuajXKbFiDCpMcmwyjEFIo66mTZdK1KI45i/Vof0 iVSmYs7QLduNA12kEgx1crZHE+wAGLI2Eb6JwoLZzNnbbzV+3rz5qsRIrBGHOYMRz+rX Jr4YFQc5iu1kDqaOg7NreJR9KziPN9Npf+/FUUGZz1EaunEgcjfIEhyzycE6nTRiQjvj thLA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y25-v6si4509966pga.39.2018.09.13.07.05.19; Thu, 13 Sep 2018 07:05:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732177AbeIMTOr (ORCPT + 99 others); Thu, 13 Sep 2018 15:14:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:35468 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731360AbeIMTOq (ORCPT ); Thu, 13 Sep 2018 15:14:46 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 45D9CD36; Thu, 13 Sep 2018 14:05:06 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lyude Paul , Jan-Marek Glogowski , Rodrigo Vivi Subject: [PATCH 4.18 181/197] drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse" Date: Thu, 13 Sep 2018 15:32:10 +0200 Message-Id: <20180913131848.803046555@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jan-Marek Glogowski commit 399334708b4f07b107094e5db4a390f0f25d2d4f upstream. 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") Fixes: c85d200e8321 ("drm/i915: Move SST DP link retraining into the ->post_hotplug() hook") [Cleaned up commit message, added stable cc] Signed-off-by: Lyude Paul Signed-off-by: Jan-Marek Glogowski Cc: stable@vger.kernel.org Link: https://patchwork.freedesktop.org/patch/msgid/20180825191035.3945-1-lyude@redhat.com (cherry picked from commit 3cf71bc9904d7ee4a25a822c5dcb54c7804ea388) Signed-off-by: Rodrigo Vivi Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/i915/intel_dp.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4293,18 +4293,6 @@ intel_dp_needs_link_retrain(struct intel 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) { @@ -4794,7 +4782,8 @@ intel_dp_unset_edid(struct intel_dp *int } static int -intel_dp_long_pulse(struct intel_connector *connector) +intel_dp_long_pulse(struct intel_connector *connector, + struct drm_modeset_acquire_ctx *ctx) { struct drm_i915_private *dev_priv = to_i915(connector->base.dev); struct intel_dp *intel_dp = intel_attached_dp(&connector->base); @@ -4853,6 +4842,22 @@ intel_dp_long_pulse(struct intel_connect */ 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, ctx); } /* @@ -4914,7 +4919,7 @@ intel_dp_detect(struct drm_connector *co return ret; } - status = intel_dp_long_pulse(intel_dp->attached_connector); + status = intel_dp_long_pulse(intel_dp->attached_connector, ctx); } intel_dp->detect_done = false;