Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp21253550ybl; Mon, 6 Jan 2020 00:36:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwXidU+IM8mTKYgvKF1WZB6zCJsTqGO28DDtflsmbsnZSvukkV3doF8SpiyvtyB9ARhmsLn X-Received: by 2002:a9d:70cb:: with SMTP id w11mr99005759otj.230.1578299786431; Mon, 06 Jan 2020 00:36:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578299786; cv=none; d=google.com; s=arc-20160816; b=UHcuvwzPUnshviWj5OKCOQgFHcHZt7dJj6pfZxJokBhHegqr4WJjPSrIFfPBQSzxt7 3BtnEVXqE5cAcIHE/4iLPGkRocT/v10BY3J8DtSkPfr3fuwa+Qx9zjzd2IH48Bh4mLd6 7j71XS3bTa7OSnZE4h8lvGHPIlqcoIplcH+SgQUkwTMWF+CzZGAHy3Ddxe2lb2cuGPaC vrJlmpEZ6+xRSkggZM+27PPlqN7fDE9lzW8Z4PlKU9Pv8l7jf13dvKZGBXvgI9YN4JdC pE5Ml9XpWi3Iq7WYmu6voPjYO+R1jP/PhgvCHb84LqdcZ2+4dLdy0IY8O1FF9QznW2Sr 1VBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=RICwzBJIvVjWAci/RgMlGLDYpevtbFso27yNEgg+WE0=; b=Qlba+MSxALHwHF/Xhli9ct4pBTjfzwO9Yxtnb9F4Bu+Xe8ECxImp/FznETAQWDojtg phDgwwLxT2J3i3QGidNWnDjtm1VBwe1z8ke9txdSNFE4O0i4GqRkXHfkbOJcOXV/7I6A AMlOWcGNEetUDoh/Uitlxv2BvJfrIbFulSN78tGAbsLSXnJ+jLa0jDCeowUS9grUzFOn AHwdkQrdsCOn+JpXeLUI6FQw4c1M5W9WSpVs1OnVUhAMZTodU0j4fQnT7nh4ImMV3oky cbY3AtI+b0RTVFyfNCxIZ+k/ThdQfJkHBcPgymBKYDbLvZ+ODCobdQ7u2d74wX8DUAoN LPDw== 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 w202si24423654oiw.194.2020.01.06.00.36.14; Mon, 06 Jan 2020 00:36:26 -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 S1726199AbgAFIff convert rfc822-to-8bit (ORCPT + 99 others); Mon, 6 Jan 2020 03:35:35 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:38226 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725446AbgAFIfe (ORCPT ); Mon, 6 Jan 2020 03:35:34 -0500 Received: from mail-pf1-f200.google.com ([209.85.210.200]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1ioNrH-00033b-Sd for linux-kernel@vger.kernel.org; Mon, 06 Jan 2020 08:35:32 +0000 Received: by mail-pf1-f200.google.com with SMTP id r127so36042310pfc.11 for ; Mon, 06 Jan 2020 00:35:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=tUJkQQozsNHPjRDCkf1oaa592cZNd4E3zEgxAi9AoEA=; b=F+wKiOqCaW05GuHjeVXOpKS1dNfKXe2sov4Z2qYcrPTHRl9k2J6S8PRjp8CFGrV7Rd H4IMD3EINJorE/XP166sYINM1YYdYpRghxX2qGbyoro7O/wt8Eq7Xwgm5DKnfX0PDoCA p+WS8nS8MPP2d5FEVTMLFfmcxXb1sMQ3PsfS4Yuq+WLTvf3KF2RyydGsIC1bKOTs2ZjV qvqPwYgkWbUIGQ4t00Iv+C3Lh6l3Our/Cl9LY6/rb5pLAME5CBu6thNeGgFDmzUc3Qz9 DwjYKfmB4trxR0TXgcYnE9xQ6WmgtDTzslSa4HRUQj+k2eWe0ZJwCdSxbjXGLqu7FvNF YNYQ== X-Gm-Message-State: APjAAAW550DZEHTCN80uCLraZ1EQ7cvKJZ2eslJAZPQ2OhTTvCXv4E1I OvNsoX4pE4llrhr9cOsBe0RbUucGJBpQNvb/RQro0EFmz87dCdK/fA+Z6K9bTdmvgbp3d6UGqBN vno7MDoxZVZQiD72KCA5PjIGVaeW4JOOww4KLZOLLTQ== X-Received: by 2002:a17:902:9f92:: with SMTP id g18mr102350193plq.161.1578299730381; Mon, 06 Jan 2020 00:35:30 -0800 (PST) X-Received: by 2002:a17:902:9f92:: with SMTP id g18mr102350166plq.161.1578299730046; Mon, 06 Jan 2020 00:35:30 -0800 (PST) Received: from 2001-b011-380f-35a3-2839-ccbd-36ed-2f4a.dynamic-ip6.hinet.net (2001-b011-380f-35a3-2839-ccbd-36ed-2f4a.dynamic-ip6.hinet.net. [2001:b011:380f:35a3:2839:ccbd:36ed:2f4a]) by smtp.gmail.com with ESMTPSA id bo19sm23083748pjb.25.2020.01.06.00.35.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jan 2020 00:35:29 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.40.2.2.4\)) Subject: Re: [PATCH v3] drm/i915: Re-init lspcon after HPD if lspcon probe failed From: Kai-Heng Feng In-Reply-To: <20191224084251.28414-1-kai.heng.feng@canonical.com> Date: Mon, 6 Jan 2020 16:35:26 +0800 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 Content-Transfer-Encoding: 8BIT Message-Id: <85235F00-7FBA-46E4-B7A5-45294DE1B824@canonical.com> References: <20191224084251.28414-1-kai.heng.feng@canonical.com> To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, airlied@linux.ie, daniel@ffwll.ch X-Mailer: Apple Mail (2.3608.40.2.2.4) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jani, > On Dec 24, 2019, at 16:42, Kai-Heng Feng wrote: > > 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. Do you have any further suggestion for this patch? Kai-Heng > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/203 > Signed-off-by: Kai-Heng Feng > --- > v3: > - Make sure it's handled under long HPD case. > > v2: > - Move lspcon_init() inside of intel_dp_hpd_pulse(). > > drivers/gpu/drm/i915/display/intel_dp.c | 8 +++++++- > 1 file changed, 7 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..a72c9c041c60 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) { > /* > @@ -6593,7 +6594,12 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd) > long_hpd ? "long" : "short"); > > if (long_hpd) { > - intel_dp->reset_link_params = true; > + if (intel_dig_port->base.type == INTEL_OUTPUT_DDI && > + HAS_LSPCON(dev_priv) && !intel_dig_port->lspcon.active) > + lspcon_init(intel_dig_port); > + else > + intel_dp->reset_link_params = true; > + > return IRQ_NONE; > } > > -- > 2.17.1 >