Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6646067ybl; Mon, 23 Dec 2019 09:14:19 -0800 (PST) X-Google-Smtp-Source: APXvYqzbKGlGvU1HEnqXLmDuXwgjdwlE7Wp08MKJgwz1T790YLeIi5DqiLdTIdgNiz9rorqJigcC X-Received: by 2002:a9d:133:: with SMTP id 48mr32530875otu.15.1577121259278; Mon, 23 Dec 2019 09:14:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577121259; cv=none; d=google.com; s=arc-20160816; b=gMCmH/q+cdY5xljnA3jf+nMh8N+hA6i2d/9YOglXwJ9kEYmjLPNPp219FRG7Fq1syz k9RXlfkwaUS/oCmF/58AAHG5k3/kc08btQFiVkQojJmeM5/dY+G+Qk6a7YoaLP8kSiPd a7WDNFqphbZDmPNIqvhLwOSrAn9BbKIQuiCwnFkz/nKgwXEXprKeeU0IY14stN6tcavW 7wo/w6rK6QQ6KFPQpxcQGMoMbUNhyy87dpPxrLkFL11Cuf2ERdb3qR60NUCgctmdplHM nOvst0O4I22VV+tmoxu12VAsouOnrr35rbDw0Jg1PAu8UQestq3zjT+zQA8QRDy+Bpnl OokA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=q6H0wIo9I91sTR7vpTV/qfQ/RLCdjibTo0IUcKY25JA=; b=Qdly9tV1uuMuDGutW+rEzRrTGye/ZGqweab1CvEX5SOFZTUvMEA9wk9p6Z2WmVuLmh IQogGhspV3V1kcJrNxjhuP2mybewdB7DOC6QcJFYA6ApthApIEtohUyMtANTT+fDWtzD ijoMG4S2FMSKODoY1C8h/eTP1ztoHeRuQR9IUoI+bCAXfta3ErhSd7rrXUzfLqsCUoe3 v3IGDthAcM44tgW3J9WgD07ROoLHeEB5Q7rqPMRDmyUGSwwsoxhzdKHoVOh8IofkvtH7 p63B6d3B7PMZJ4nD2+l0MRAsbmDZzcG0CXMnRLUOfmHpMW6ANPj7b/v8Ys0F15EUmmC9 x6FA== 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=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p5si10534240oto.116.2019.12.23.09.14.06; Mon, 23 Dec 2019 09:14:19 -0800 (PST) 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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbfLWRNW (ORCPT + 99 others); Mon, 23 Dec 2019 12:13:22 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:37007 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726718AbfLWRNW (ORCPT ); Mon, 23 Dec 2019 12:13:22 -0500 Received: from 61-220-137-37.hinet-ip.hinet.net ([61.220.137.37] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ijRGc-0005S4-W4; Mon, 23 Dec 2019 17:13:15 +0000 From: Kai-Heng Feng To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, airlied@linux.ie, daniel@ffwll.ch Cc: ville.syrjala@linux.intel.com, swati2.sharma@intel.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Kai-Heng Feng Subject: [PATCH v2] drm/i915: Re-init lspcon after HPD if lspcon probe failed Date: Tue, 24 Dec 2019 01:13:10 +0800 Message-Id: <20191223171310.21192-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On HP 800 G4 DM, if HDMI cable isn't plugged before boot, the HDMI port becomes useless and never responds to cable hotplugging: [ 3.031904] [drm:lspcon_init [i915]] *ERROR* Failed to probe lspcon [ 3.031945] [drm:intel_ddi_init [i915]] *ERROR* LSPCON init failed on port D Seems like the lspcon chip on the system in question only gets powered after the cable is plugged. So let's call lspcon_init() dynamically to properly initialize the lspcon chip and make HDMI port work. Signed-off-by: Kai-Heng Feng --- v2: - Move lspcon_init() inside of intel_dp_hpd_pulse(). drivers/gpu/drm/i915/display/intel_dp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index fe31bbfd6c62..eb395b45527e 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -6573,6 +6573,7 @@ enum irqreturn intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) { struct intel_dp *intel_dp = &intel_dig_port->dp; + struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); if (long_hpd && intel_dig_port->base.type == INTEL_OUTPUT_EDP) { /* @@ -6592,11 +6593,14 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) intel_dig_port->base.base.name, long_hpd ? "long" : "short"); - if (long_hpd) { + if (long_hpd && intel_dig_port->base.type != INTEL_OUTPUT_DDI) { intel_dp->reset_link_params = true; return IRQ_NONE; } + if (long_hpd && HAS_LSPCON(dev_priv) && !intel_dig_port->lspcon.active) + lspcon_init(intel_dig_port); + if (intel_dp->is_mst) { if (intel_dp_check_mst_status(intel_dp) == -EINVAL) { /* -- 2.17.1