Received: by 10.213.65.68 with SMTP id h4csp1287534imn; Wed, 4 Apr 2018 16:29:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx49VV8T53dUlTYpxDk2LHYEP2kmpDzvXkTgqdVW29RmrlgOAa6lWBxQQtSf1HLSqaX8gWK2Q X-Received: by 2002:a17:902:6a85:: with SMTP id n5-v6mr20678432plk.313.1522884579521; Wed, 04 Apr 2018 16:29:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522884579; cv=none; d=google.com; s=arc-20160816; b=NFmf5OmNkAOEJRN2KLf/v+vRptpqsIzmH9TuYi2DP2RTweY7xXSKlLzTvEhhzMOco1 prSie4+9FiQ9LmqwfEtiK9F64VyGpB8Tp3y9TQZvSXFQq2kCrRTsVeBUy/U5gVoN2oB4 K8LqOMtYV4oT7vayk4xHZR0YUFM31Hxcoa7Ws4CyvnciePLdizJ+RrBnP1kbS2wNcCbw jjWtF36Vx5ELtuFwItf9ykTtaScjrN7ffwTETVVHm0bH8Kz5j7n6+6TviOakeotJzXH4 uoZud1kdmuw+bbXDrQRD0NxmyUjQ6b/O+/HO9QEU3rZV+8BP0/0uVcLEM6xX98CrsIkk 6JjQ== 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=K08GuEC3OxETEgg405+03zAaW+C88/wZyhUwDF3xVEE=; b=b8kr5OmdjiGBfFsYNQtT0GLwG7mqcJ7pHIKumgGySPOv2Qdro5XiG1Db7aUzyFhvgl I86Ym8wq/mQahvD/6p/1beCZ17s9qwjVU0DNlFbTuOcsT0sYeSh674JYVRGNaam6hQuW upPTA9P9N89gz2aqQzYoPs/w+V+t5rKZXBmf4N+0CRWWD7SjfJdaQCKPeh2bNV8Ys17f SFo++hNmhGvh++MR0EkoAAt4FY6Ws1a6d1G0IvuJ3hZKJi6RKsKOnTMoXUBy5P25wl8K 0ByF9ITh/FhxQCCwNNcjBBw8uSCkcYkahgiKDLUPspTA9w/x/s9VALfxR2fVxxlBbZHi XQLQ== 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 c7-v6si4670416plr.398.2018.04.04.16.29.25; Wed, 04 Apr 2018 16:29:39 -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 S1752734AbeDDX2R (ORCPT + 99 others); Wed, 4 Apr 2018 19:28:17 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:33334 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752685AbeDDX2M (ORCPT ); Wed, 4 Apr 2018 19:28:12 -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 862C84072CF7; Wed, 4 Apr 2018 23:28:11 +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 39AA52166BAE; Wed, 4 Apr 2018 23:28:09 +0000 (UTC) From: Lyude Paul To: intel-gfx@lists.freedesktop.org Cc: Dhinakaran Pandiyan , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , 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: [PATCH] drm/i915/dp: Send DPCD ON for MST before phy_up Date: Wed, 4 Apr 2018 19:27:21 -0400 Message-Id: <20180404232721.28044-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]); Wed, 04 Apr 2018 23:28:11 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 04 Apr 2018 23:28:11 +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 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) + 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); if (intel_dp->active_mst_links == 0) intel_dig_port->base.pre_enable(&intel_dig_port->base, -- 2.14.3