Received: by 10.213.65.68 with SMTP id h4csp2803952imn; Mon, 2 Apr 2018 14:27:45 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+sbddB4Qs2X0zPu4aVJlBF9oOAk7HM3C+QRAEiqczLnMzbJih0bNWu3STc8eI18I27HRe9 X-Received: by 10.99.1.133 with SMTP id 127mr7394249pgb.24.1522704465633; Mon, 02 Apr 2018 14:27:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522704465; cv=none; d=google.com; s=arc-20160816; b=dF3Az+maZE2Kf7LPU7k06IdGHQuyrLXSghFbl0vs4JDsALRXYGIZ1AUT7Wrs9FlYkF OW0UkopTNRuaaXnZR7Tx5p7Ji287aXgJ5Ap2+vsIS0kerSoE2rPhO7Yo8VpUqM/CBoZr UH7NsTt3NK3LmOWogErl0GACMoKT7jpwCzLCRmeuiHEmAB14eIUC06wjuf9O2wGJY/ni d9ziKnbU3JO2c8EA9OQoeAR+AN/8eXIZVGhnqsGYn6oPScK88YfD9aX94EWLMuSX/Izk XJl4BoxVwPMgTQAeLbhmHEOpsZqT0vmX5Wh/hDRMADHYTdJ2053hkCAKd4fGOEj+19D4 vxrw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=skNhlii13ov9Gc80Rst3gsLRgCtzmKVTje33BnW2iBU=; b=c9P1UdhJcOOc/SSJnawVf80rmS+jmmCvC2j3Kuvt6rSY6QQ6ebYrZyCtiNYIRbFfF4 GYnQ+/awFT1A+mu4Hkn3pz3J17q3CPaPsYpZbAVza8eqh/SK2TLYi+9RCZpXkbWZAzho eE36l1w8//xGm5aQpwpUXc1p2x67bLpd1ci2G6BlE+06/cJlkcSxaSEmvvrkaciU9v6A iMwgTu5SC6vzVtKkSxwcxfsunEfVWzLSkExaw9/Mve0ThGT1yrqbpOeMl55R4dvWCcWS PNK369DHEOqImu78aPp3nrhQ8EV+Zh+9ZkeHaCjEY1bl11EXbJI04gXQ5iIcimbVady4 yn+A== 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 m18si893617pfi.296.2018.04.02.14.27.31; Mon, 02 Apr 2018 14:27:45 -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 S1754486AbeDBV00 (ORCPT + 99 others); Mon, 2 Apr 2018 17:26:26 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:46906 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753393AbeDBV0Z (ORCPT ); Mon, 2 Apr 2018 17:26:25 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 66BBA76FBA; Mon, 2 Apr 2018 21:26:24 +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 9307CD7DFA; Mon, 2 Apr 2018 21:26:21 +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 v2] drm/i915: Keep AUX block running when disabling DPMS for MST Date: Mon, 2 Apr 2018 17:26:16 -0400 Message-Id: <20180402212617.21247-1-lyude@redhat.com> In-Reply-To: <20180402212142.19841-1-lyude@redhat.com> References: <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.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 02 Apr 2018 21:26:24 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Mon, 02 Apr 2018 21:26:24 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.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. Changes since v2: - Fix patch name, no functional changes 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