Received: by 10.213.65.68 with SMTP id h4csp1060514imn; Wed, 4 Apr 2018 11:54:44 -0700 (PDT) X-Google-Smtp-Source: AIpwx48rxl4Pp6mPufZAIymEUGiyWRcR2c0kRTw6M3ymlX9dGSD+cJm8ow9qnC6F+cG4YHVmLNL2 X-Received: by 2002:a17:902:ac8a:: with SMTP id h10-v6mr19806716plr.290.1522868084552; Wed, 04 Apr 2018 11:54:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522868084; cv=none; d=google.com; s=arc-20160816; b=BEVIRCEgRAheVy7I57MeVhTHcO71PTT3LLJDFqjzSgCZUH/17tkp+wFV3RrhODGEOE dnl0cFsV5WHxnogPxMP7y6KKdgJIt4ir/PyjFbhFBbLw1aGcXHLtNESXMYkq1gWQ2Bwb hUB9a/M2tWtPcuLzct9aO+I1iCYYAiC0/nBx21exDZC+gxaHRd1NJWvLXceNQ12xE43Y t31q1wnAK7to9j1JDJE+EyaYZuLNYqMXVt8JWKPnXLv0VJUIpDVXZTcfF0kZodz0aL3l KH6h3G8bb9G71H/Xlh3DayTo7QL0OBtzFKCEtJiLRWKjZ99ft00B9ef8urkOXA6rNlSA cwUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=qVk65IYC5/wPjgwryw7CsR3w2eQWFxdDSbf2uAOOveI=; b=R75cjzClDmtcKqQbfxANlkCiyVHXAvmEid/QhaP5iU83AKtojtBj2FMX23DfZHOoBl +sh8FBlV1twinM0TfxXHzY4d6KAIcueYldsIQEOFbFiLmcS7yxZp5Vf7mgcRq9xb/vO9 33KTYKcKEsuY3zSUsijXfLd2GlGTBFOFT5ylLnFzaL29M6k3U/CSxvYg8xgoPH22XMEL aDbq59SQez/fy9L7PpwI8Sw+2L3pyF/8AqEiERHdtx6+Si0hGjP0ZlKutCZSo7kM+Flk vFUUS5M+ZXP7NWl5oqfxQYddtArXvntQHcyxSVnvlY7Lmg51cgp6i6jW5u642/n41pfz /K8g== 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 h28si4149414pgn.22.2018.04.04.11.54.30; Wed, 04 Apr 2018 11:54:44 -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 S1751483AbeDDSxV (ORCPT + 99 others); Wed, 4 Apr 2018 14:53:21 -0400 Received: from mga03.intel.com ([134.134.136.65]:19909 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751231AbeDDSxU (ORCPT ); Wed, 4 Apr 2018 14:53:20 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Apr 2018 11:53:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,407,1517904000"; d="scan'208";a="34312710" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga002.fm.intel.com with SMTP; 04 Apr 2018 11:53:14 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 04 Apr 2018 21:53:13 +0300 Date: Wed, 4 Apr 2018 21:53:13 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Lyude Paul Cc: intel-gfx@lists.freedesktop.org, Laura Abbott , Dhinakaran Pandiyan , stable@vger.kernel.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] drm/i915: Keep AUX block running when disabling DPMS for MST Message-ID: <20180404185313.GG5453@intel.com> References: <20180402212142.19841-1-lyude@redhat.com> <20180402212617.21247-1-lyude@redhat.com> <20180404153429.GE5453@intel.com> <1522867061.12403.6.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1522867061.12403.6.camel@redhat.com> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 04, 2018 at 02:37:41PM -0400, Lyude Paul wrote: > On Wed, 2018-04-04 at 18:34 +0300, Ville Syrj?l? wrote: > > On Mon, Apr 02, 2018 at 05:26:16PM -0400, Lyude Paul wrote: > > > 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; > > > > This smells like a workaround for an actual bug somewhere. Why exactly > > is the slower wakeup or the AUX block a problem for MST but not for SST > > when the link training is exactly the same for SST and MST? > I actually thought about this but I still think this is the appropriate fix. > So; the real reason for the wakeup not being a problem with SST is that for > DPMS on with SST, we actually do a wait to make sure that the hub is ready > before continuing. And yes: I'm fairly sure SST does actually have around the > same wakeup time that MST does, but with the wait we do it doesn't reallhy > make a difference. With MST, we could do this but there's a few reasons I > don't think we should: > * We don't need to. D3_AUX_ON is a part of the 1.2 spec, so any hub that has > MST is going to be guaranteed to have this. > * Turning off the aux block means that there's a high chance we're going to > miss ESIs from sinks And how exactly do we lose irqs? The hub/whatever throws the up req msgs away if we don't read them within some really short time? > * It's faster to keep the aux block on anyway > > > > > > > + > > > 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 > > > > > -- > Cheers, > Lyude Paul -- Ville Syrj?l? Intel OTC