From patchwork Thu Sep 27 05:20:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dhinakaran Pandiyan X-Patchwork-Id: 10617261 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 C66D3913 for ; Thu, 27 Sep 2018 05:20:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3CE02AAF2 for ; Thu, 27 Sep 2018 05:20:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A61992ABC6; Thu, 27 Sep 2018 05:20:39 +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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 ACDE12AAF2 for ; Thu, 27 Sep 2018 05:20:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5F9986E099; Thu, 27 Sep 2018 05:20:37 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id 87DC46E099 for ; Thu, 27 Sep 2018 05:20:36 +0000 (UTC) Received: by mail-pf1-x443.google.com with SMTP id j26-v6so987111pfi.10 for ; Wed, 26 Sep 2018 22:20:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=MTFqCgg2I2s99q7GZaCxQYw1sO5vJTrRGKKxvuFA4FY=; b=KnExLi4i3d310OtCEC4Z7ZNtrN2XqC1x0jBWo6DGIu1qx+VmdcIDLefNU2PQy/JdWA cjyPGMZCcSlm/Va4n8dd8ou7IxuBOr8ns29ASGKODTjOcU9x/DstiCAsB4R9ti6ngAjl kHgVehqXc/O/4avVJwa7ZQVQUAlU+aaFDyl9MOAMmy7qQ2JD7ms7mws6bF23OdR/Mxf/ K7ABWCGnQbm6fS7VuRPeElDSdnuCTmNWwiYd40qrFnktKWmXKm3idiaKkYT8/aYr64O7 AN5RdsA0UG3jBuKTFJyg+7XeclkK9RPXLbMsotQuf5C5Sfj867BjvhBIqtCFT8XB5ks5 ujYg== X-Gm-Message-State: ABuFfogmlqNjjzX48o/R8XeWwecggufbKCxbfB0xbJ2mSFMrUHaYZaHu /mJ8FNmZ7yOnNwRkDHrb+B02r4DZm1A= X-Google-Smtp-Source: ACcGV61/hnz7dOoaIa60YiUvSP+nfxAcg5b9BYs9ul2k8kCxg0gPaqc+z1/SykgmF6vkqKRO2pB+PQ== X-Received: by 2002:a62:2646:: with SMTP id m67-v6mr9439561pfm.254.1538025635536; Wed, 26 Sep 2018 22:20:35 -0700 (PDT) Received: from dk-ThinkPad-X260.fios-router.home (50-39-164-98.bvtn.or.frontiernet.net. [50.39.164.98]) by smtp.gmail.com with ESMTPSA id y128-v6sm1190424pfb.56.2018.09.26.22.20.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 22:20:34 -0700 (PDT) From: Dhinakaran Pandiyan X-Google-Original-From: Dhinakaran Pandiyan To: intel-gfx@lists.freedesktop.org Date: Wed, 26 Sep 2018 22:20:17 -0700 Message-Id: <20180927052019.28845-1-dhinakaran.pandiyan@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Subject: [Intel-gfx] [CI 1/3] drm/i915/dp: Fix link retraining comment in intel_dp_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 Comment claims link needs to be retrained because the connected sink raised a long pulse to indicate link loss. If the sink did so, intel_dp_hotplug() would have handled link retraining. Looking at the logs in Bugzilla referenced in commit '3cf71bc9904d ("drm/i915: Re-apply Perform link quality check, unconditionally during long pulse"")', the issue is that the sink does not trigger an interrupt. What we want is ->detect() from user space to check link status and retrain. Ville's review for the original patch also indicates the same root cause. So, rewrite the comment. v2: Patch split and rewrote comment. Cc: Lyude Paul Cc: Ville Syrjälä Cc: Jani Nikula Cc: Rodrigo Vivi Cc: Jan-Marek Glogowski References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"") Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_dp.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 6b4c19123f2a..34c561011e7a 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -5074,16 +5074,9 @@ intel_dp_long_pulse(struct intel_connector *connector, 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. + * Some external monitors do not signal loss of link + * synchronization with an IRQ_HPD, so force a link status + * check. */ struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; From patchwork Thu Sep 27 05:20:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dhinakaran Pandiyan X-Patchwork-Id: 10617265 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 8B8AF913 for ; Thu, 27 Sep 2018 05:20:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7ACD62AAF2 for ; Thu, 27 Sep 2018 05:20:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F58F2ABC6; Thu, 27 Sep 2018 05:20:43 +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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 2C6CA2AAF2 for ; Thu, 27 Sep 2018 05:20:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 260656E262; Thu, 27 Sep 2018 05:20:42 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by gabe.freedesktop.org (Postfix) with ESMTPS id 18C356E25D for ; Thu, 27 Sep 2018 05:20:38 +0000 (UTC) Received: by mail-pf1-x444.google.com with SMTP id m77-v6so991617pfi.8 for ; Wed, 26 Sep 2018 22:20:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ECZZNo3QeWa14ccpcTpM+PB0imQRh21cJizPaKwi0/w=; b=gaaZkV+VZjNHW+pb697ZiCPi4CvpJ43fHZrmrc/bX7ADITRvR5Og6g78M4Ha/lNHdL 28KZnJbur3t2nW1s6w2ifl/+h04rUbJ+Dm/v7rgARqqde95iofGF30DvRrHkF0BFbu8p S+dRwIoaPWQXb+hjxwko40b4GkRffItWJmbEsxY/bEG3jsWPJUd1I6fSPlYqC/WAUcDA 1zhZgn4BH4bOyxt3Lfd1Rhayyvb3IHS0LW+TKuoXuQbr4IFxC6eVUwTHa09nBglALevd 0XdDLmvv/W8RqcLxooUCj6M98IMCDUn7h+HLe4Z34qY8AH+NwqwcKq4g0JLyCUsS7AQI /TCQ== X-Gm-Message-State: ABuFfojLK658e4EurA34Q/S9q5E7d2fAL3lRrnwW50O1KoztgFxex/By DImEHC8+sbv5oWz3I2U/La6fHwKU9fM= X-Google-Smtp-Source: ACcGV6393RGRYYtK3FdJTYIk9BfU2Zxv8El9EpVn55mHwY5ypijXfC73aSSbD+tWeXcPzsK4ENLMeA== X-Received: by 2002:a17:902:47:: with SMTP id 65-v6mr8803932pla.293.1538025637295; Wed, 26 Sep 2018 22:20:37 -0700 (PDT) Received: from dk-ThinkPad-X260.fios-router.home (50-39-164-98.bvtn.or.frontiernet.net. [50.39.164.98]) by smtp.gmail.com with ESMTPSA id y128-v6sm1190424pfb.56.2018.09.26.22.20.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 22:20:35 -0700 (PDT) From: Dhinakaran Pandiyan X-Google-Original-From: Dhinakaran Pandiyan To: intel-gfx@lists.freedesktop.org Date: Wed, 26 Sep 2018 22:20:18 -0700 Message-Id: <20180927052019.28845-2-dhinakaran.pandiyan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180927052019.28845-1-dhinakaran.pandiyan@intel.com> References: <20180927052019.28845-1-dhinakaran.pandiyan@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [CI 2/3] drm/i915/dp: Restrict link retrain workaround to external monitors 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 Commit '3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"")' applies a work around for sinks that don't signal link loss. The work around does not need to have to be that broad as the issue was seen with only one particular monitor; limit this only for external displays as eDP features like PSR turn off the link and the driver ends up retraining the link seeeing that link is not synchronized. Cc: Lyude Paul Cc: Jan-Marek Glogowski Cc: Ville Syrjälä Cc: Rodrigo Vivi References: 3cf71bc9904d ("drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"") Signed-off-by: Dhinakaran Pandiyan Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_dp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 34c561011e7a..6130d05d8b88 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -5072,12 +5072,13 @@ intel_dp_long_pulse(struct intel_connector *connector, */ status = connector_status_disconnected; goto out; - } else { - /* - * Some external monitors do not signal loss of link - * synchronization with an IRQ_HPD, so force a link status - * check. - */ + } + + /* + * Some external monitors do not signal loss of link synchronization + * with an IRQ_HPD, so force a link status check. + */ + if (!intel_dp_is_edp(intel_dp)) { struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; intel_dp_retrain_link(encoder, ctx); From patchwork Thu Sep 27 05:20:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dhinakaran Pandiyan X-Patchwork-Id: 10617263 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 01E04913 for ; Thu, 27 Sep 2018 05:20:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5FF22AAF2 for ; Thu, 27 Sep 2018 05:20:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA9012ABC6; Thu, 27 Sep 2018 05:20:41 +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,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 992792AAF2 for ; Thu, 27 Sep 2018 05:20:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D4C9F6E25D; Thu, 27 Sep 2018 05:20:40 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id A41FA6E25D for ; Thu, 27 Sep 2018 05:20:39 +0000 (UTC) Received: by mail-pg1-x542.google.com with SMTP id g2-v6so996072pgu.11 for ; Wed, 26 Sep 2018 22:20:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lGdsTzCsvumbUayRWmhagLNog/i3kUYHJf/Nc0MaeKo=; b=uVdALnaObGnTUndxZIf6PulfyCMwIrWZcQ8OALgep2k/08xl9z6vSMkl6jVAVMtpFf E0O1f5msunocaUqnJAZJYGQfY8sIIJ87xcxL+Ft6iRYNqpaeeWPGbcgrnhWANZPdqnqc 2UsTMI3KJhx3dkuLAhVXJt2zfED5cGPk5b6E9wfICjmmeaAU1rjqqMMwce5Au4zxUFBY /svQqEIJyM1JDBIfDFkRmdPrrX5w5gJF9dnjeqAAxyIb75WuDGxbPaGNrrQagNfiDyEg CLtL53nUNZOpxB/73fR1/m7OgjEsH30xdBlMDREPHKEkG7OEIGo60pcWLNokjUWmviqS H6eg== X-Gm-Message-State: ABuFfoiPXvbXup50mM7aeCeEeTekH8qjJ+vNScO4kbbZmAK/b1coX2ar EEetrnL7S5fX/4WSwMYHlHHYlHcM+10= X-Google-Smtp-Source: ACcGV60QsrXZoN62DO03TjU+V/zOr+CDrkRqdj70Ji6y/7uPI6mZoi59b9/XCcRyDyrVnfUMsE2Zgw== X-Received: by 2002:a17:902:d201:: with SMTP id t1-v6mr9056273ply.63.1538025638873; Wed, 26 Sep 2018 22:20:38 -0700 (PDT) Received: from dk-ThinkPad-X260.fios-router.home (50-39-164-98.bvtn.or.frontiernet.net. [50.39.164.98]) by smtp.gmail.com with ESMTPSA id y128-v6sm1190424pfb.56.2018.09.26.22.20.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Sep 2018 22:20:37 -0700 (PDT) From: Dhinakaran Pandiyan X-Google-Original-From: Dhinakaran Pandiyan To: intel-gfx@lists.freedesktop.org Date: Wed, 26 Sep 2018 22:20:19 -0700 Message-Id: <20180927052019.28845-3-dhinakaran.pandiyan@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180927052019.28845-1-dhinakaran.pandiyan@intel.com> References: <20180927052019.28845-1-dhinakaran.pandiyan@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [CI 3/3] drm/i915/dp: Use a local variable for intel_encoder * 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 We have two cases of intel_dp to intel_encoder conversions, use a local variable to store the conversion. Signed-off-by: Dhinakaran Pandiyan Reviewed-by: José Roberto de Souza Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/i915/intel_dp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 6130d05d8b88..09229fc66dec 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -5017,6 +5017,7 @@ intel_dp_long_pulse(struct intel_connector *connector, { struct drm_i915_private *dev_priv = to_i915(connector->base.dev); struct intel_dp *intel_dp = intel_attached_dp(&connector->base); + struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; enum drm_connector_status status; u8 sink_irq_vector = 0; @@ -5027,7 +5028,7 @@ intel_dp_long_pulse(struct intel_connector *connector, /* Can't disconnect eDP */ if (intel_dp_is_edp(intel_dp)) status = edp_detect(intel_dp); - else if (intel_digital_port_connected(&dp_to_dig_port(intel_dp)->base)) + else if (intel_digital_port_connected(encoder)) status = intel_dp_detect_dpcd(intel_dp); else status = connector_status_disconnected; @@ -5078,11 +5079,8 @@ intel_dp_long_pulse(struct intel_connector *connector, * Some external monitors do not signal loss of link synchronization * with an IRQ_HPD, so force a link status check. */ - if (!intel_dp_is_edp(intel_dp)) { - struct intel_encoder *encoder = &dp_to_dig_port(intel_dp)->base; - + if (!intel_dp_is_edp(intel_dp)) intel_dp_retrain_link(encoder, ctx); - } /* * Clearing NACK and defer counts to get their exact values