Received: by 10.213.65.68 with SMTP id h4csp2801000imn; Mon, 2 Apr 2018 14:23:26 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+Qb/FwG4wi5IHuG7hpkYYfx/VQcFGRvAmsJZk13F5QPxEqZmri3JbJWFJTfSYF2AhLk8iK X-Received: by 10.98.10.156 with SMTP id 28mr8490048pfk.33.1522704206351; Mon, 02 Apr 2018 14:23:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522704206; cv=none; d=google.com; s=arc-20160816; b=uetlqM9bVX3yaXTKPA2+84EvC0pxeJYdUZjbK3+P/OKpW7nzk5ttiR1tcCJXvLqX2b C7sOMeFt8IS72uxzZ7yfFkmcZufwvhtQ3idOPhG/cZNdC3GU2pvMSPWAqmvgV+d3bn1P O1Tgee9htzibyVNzTeIQBtQ0V3WyZC1vJ/yywNEjph52wQyA71UeBqMTTiEYrfCgXzX3 5bNk0fiy7aImWOUEA7o+Nt0rUZR7k0jaufm6HXGAYFuuhGmfV9FFjn09j9O3iNyHrE6O 6CVF1gj5RFodKKCU5fQSiX3masEemsvzbL2KBOqlJi1hkBHgG80PRUTqAI71iqK1ZEaj qOvA== 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 :message-id:date:subject:cc:to:from:arc-authentication-results; bh=an6XexS36+dViML+r/QtluAyC9cRG3RAO+9zwBwV+bA=; b=Evb4lzfc5TTHalSkTedYHHbpcbkm9hDTXDD2232FgB0yKAXLwyPqNozTJWdjmsooZl JpfJ2BtevvVOICCrCNUPKHx+Ll3NK7mXrQ2U4tB1mcPeJ8DsK8eS27gLacAIRGsMnbHJ hq60iuKnkb2t7/GVxa7Ly/YYfW0SD7H0A3ANkKZc5afohlm5naRgnkTfYvtl5MyLdXBP oF7SfU+6gLzl83QZgD2O9m77Dy3BcdlXetT88gDXn27qz7G02Ip+puL+I/UFuxh71BqK E+za4FS2n5ucBjH02fDLau9ygqI4qtl6T7u+P3DDh2GE1ZF1S/IjG0dQWCE1fuYP0I0e gORQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13-v6si1205135plp.149.2018.04.02.14.23.12; Mon, 02 Apr 2018 14:23:26 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754332AbeDBVWI (ORCPT + 99 others); Mon, 2 Apr 2018 17:22:08 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:57090 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752311AbeDBVWH (ORCPT ); Mon, 2 Apr 2018 17:22:07 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7E8F4406E8BD; Mon, 2 Apr 2018 21:21:56 +0000 (UTC) Received: from malachite.bss.redhat.com (dhcp-10-20-1-55.bss.redhat.com [10.20.1.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03787215CDAF; Mon, 2 Apr 2018 21:21:52 +0000 (UTC) From: Lyude Paul To: intel-gfx@lists.freedesktop.org Cc: Laura Abbott , Dhinakaran Pandiyan , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , stable@vger.kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] i915/dp_mst: Keep AUX block running when disabling DPMS Date: Mon, 2 Apr 2018 17:21:41 -0400 Message-Id: <20180402212142.19841-1-lyude@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 02 Apr 2018 21:22:06 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Mon, 02 Apr 2018 21:22:06 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lyude@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While enabling/disabling DPMS before link training with MST hubs is perfectly valid; unfortunately disabling DPMS results in some devices disabling their AUX CH block as well. For SST this isn't as much of a problem, but for MST we need to be able to continue handling aux transactions even when none of the sinks are turned on since it's possible for us to have a single atomic commit which results in disabling each downstream sink, followed by subsequently re-enabling each sink. If we don't do this, we'll end up stalling any pending ESI interrupts from the sink for up to 1ms. Unfortunately, dropping ESIs during this timespan makes it so that link fallback retraining for MST (which I will be submitting to the ML shortly) fails due to the channel EQ failure interrupts potentially getting dropped. Additionally, when performing a modeset that brings the hub status's link status from bad -> good having ESIs disabled for that long causes us to miss the hub's response to us trying to start link training as well. Since any sink with MST is going to support DisplayPort 1.2 anyway, save us the hassle of trying to wait until the sink comes back up and just never shut the aux block down. Signed-off-by: Lyude Paul Cc: Laura Abbott Cc: Dhinakaran Pandiyan Cc: Ville Syrjälä Cc: stable@vger.kernel.org Fixes: ad260ab32a4d9 ("drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.") --- drivers/gpu/drm/i915/intel_dp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 62f82c4298ac..0479c377981b 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -2589,11 +2589,13 @@ void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode) return; if (mode != DRM_MODE_DPMS_ON) { + unsigned char data = intel_dp->is_mst ? + DP_SET_POWER_D3_AUX_ON : DP_SET_POWER_D3; + if (downstream_hpd_needs_d0(intel_dp)) return; - ret = drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER, - DP_SET_POWER_D3); + ret = drm_dp_dpcd_writeb(&intel_dp->aux, DP_SET_POWER, data); } else { struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp); -- 2.14.3