Received: by 10.213.65.68 with SMTP id h4csp2143786imn; Thu, 5 Apr 2018 09:40:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/XqltoGjYQ7t45hRhpExRMs11faUOgtiOnOR2B7Hu7M6k9pkja8XKzIwHKYLCTL7iKBguA X-Received: by 2002:a17:902:6103:: with SMTP id t3-v6mr23709051plj.76.1522946447065; Thu, 05 Apr 2018 09:40:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522946447; cv=none; d=google.com; s=arc-20160816; b=Grti2eM/FxVpLUvzGVSEgpPN7C1a3NBOkmtr/cGrjhJrxbLSHanCToDYirFNeqtO1g a3OmSFt9lXjP29+X2Q4jSAVuau5eEYN3Ow+qoILX29cF0ZwJS8VQtAMB3N+CTsz06ADh AEAPjhZk/H9CqJGcmdFRxi8m1beTuuN5aVBUwl1vSy+LgR3c0Fd4hOutJfpkJiVZUWw9 ZW4gBQ0TrEHLrph6weTaVEzRcdO9/GqLMzQ1SY1kLyVcMFsKQ3h4LwGPDTlIrzyA3SfP 8nakGW8QTuw9kC22y8BAwdGmbN3GljRxB2mS8hZ2L9WfQ50HZKNKCOEQTOlCsp/D0sM4 xi+w== 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=NN4pC1159UYsIJdxLIs0MojgbQ1ickX+qFzht+lzSnE=; b=IDnvPMChtmEv2nLhtwOAeaVexNxkrrO93LjZdhUmVjSdnHZGVm4D5mYp/NeoUfHtEE SRNe7AI5p+gv1gX4izLvBb90O3pMMzZ9DR7NXVbY7Zy2y7sPK+xUk1caUZcD+dHZv5FL 5JtVXvXBPm80mjVRF5MGvS9b0mvBoDVFriDAQdzBjzHB+6OwuLEiBYKC+Jw0sM+ol9SH LrVycVonYsygDIe2WrkCs/tVklShNnpkH/kA4OfMQK1u5kxqo3KhTANEX6Iu/KaxGhwn 27h0H3SlCcqSV9UwUSpBFNpeQqubgjyOBPhtCDge5DO6kjYzaD4PhJU0YKsXYBReipiy 9TnA== 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 bj1-v6si5834399plb.690.2018.04.05.09.40.32; Thu, 05 Apr 2018 09:40:47 -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 S1751445AbeDEQjB (ORCPT + 99 others); Thu, 5 Apr 2018 12:39:01 -0400 Received: from mga09.intel.com ([134.134.136.24]:16652 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbeDEQi7 (ORCPT ); Thu, 5 Apr 2018 12:38:59 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2018 09:38:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,411,1517904000"; d="scan'208";a="45203816" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga001.jf.intel.com with SMTP; 05 Apr 2018 09:38:54 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 05 Apr 2018 19:38:53 +0300 Date: Thu, 5 Apr 2018 19:38:53 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Lyude Paul Cc: intel-gfx@lists.freedesktop.org, Dhinakaran Pandiyan , Laura Abbott , 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] drm/i915/dp: Send DPCD ON for MST before phy_up Message-ID: <20180405163853.GK5453@intel.com> References: <20180404232721.28044-1-lyude@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180404232721.28044-1-lyude@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 07:27:21PM -0400, Lyude Paul wrote: > As it turns out, the aux block being off was not the real problem here, > as transition from D3 to D0 is mandated by the DP spec to take a maximum > of 1ms, whereas we're allowed a 100ms timeframe to respond to ESI irqs. > The real problem here is a bit more subtle. > > When doing a modeset where the problem of the sink timing out to our > sideband requests when transitioning from D3 to D0 occurs, the timeout > is from the aux block not coming on. However, nothing else times out > other than the initial phy_up message because the DPCD on call in > intel_ddi_enable_dp() ends up waking up the AUX block on the hub, not > the phy_up sideband message. This means that the real fix we need is to > use the DPMS on before sending a phy_up to ensure that the hub is ready > to accept sideband messages. > > Signed-off-by: Lyude Paul > Cc: Dhinakaran Pandiyan > Cc: Ville Syrj?l? > Cc: Laura Abbott > Cc: stable@vger.kernel.org > Fixes: ad260ab32a4d9 ("drm/i915/dp: Write to SET_POWER dpcd to enable MST hub.") > --- > drivers/gpu/drm/i915/intel_ddi.c | 6 +++++- > drivers/gpu/drm/i915/intel_dp_mst.c | 1 + > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c > index a6672a9abd85..9bd675f73f7b 100644 > --- a/drivers/gpu/drm/i915/intel_ddi.c > +++ b/drivers/gpu/drm/i915/intel_ddi.c > @@ -2324,7 +2324,11 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder, > intel_prepare_dp_ddi_buffers(encoder, crtc_state); > > intel_ddi_init_dp_buf_reg(encoder); > - intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON); > + /* for MST, we do DPMS_ON outside of here so that DPMS_ON can happen > + * before drm_dp_send_power_updown_phy() > + */ > + if (!intel_dp->is_mst) Just 'is_mst' should do here. And in general I'd like to see the enable and disable paths remain symmetric. Ie. also move out the dpms call in the disable path (or maybe move the phy_power_up/down in?). > + intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON); > intel_dp_start_link_train(intel_dp); > if (port != PORT_A || INTEL_GEN(dev_priv) >= 9) > intel_dp_stop_link_train(intel_dp); > diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c > index c3de0918ee13..eff9a4eae1f0 100644 > --- a/drivers/gpu/drm/i915/intel_dp_mst.c > +++ b/drivers/gpu/drm/i915/intel_dp_mst.c > @@ -223,6 +223,7 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder, > > DRM_DEBUG_KMS("active links %d\n", intel_dp->active_mst_links); > > + intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON); > drm_dp_send_power_updown_phy(&intel_dp->mst_mgr, connector->port, true); This could use a comment to remind people that the order does matter. > if (intel_dp->active_mst_links == 0) > intel_dig_port->base.pre_enable(&intel_dig_port->base, > -- > 2.14.3 -- Ville Syrj?l? Intel OTC