Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6670529ybl; Mon, 23 Dec 2019 09:38:34 -0800 (PST) X-Google-Smtp-Source: APXvYqwgHaydmq8+iKdbnhqZLmEY/KV1xwXmATnIIQ6mmZ4Fczx/fFfX8B15m55ZQYFekEO55ho3 X-Received: by 2002:a05:6830:158:: with SMTP id j24mr34490607otp.316.1577122714645; Mon, 23 Dec 2019 09:38:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577122714; cv=none; d=google.com; s=arc-20160816; b=hHgjnnrXLHy68znOoVD6wbyBa2yj6Qr+aFppBmJKEzIl/4pyIhgeA/LVyQpEJh0nZr 6M9LqNSY+361j5CgHAb0Jsbb87VYSDCjjJNyuz880yq6+wxun0nP7dzra+7ti1p9r+j7 /TKvpWtfE+w3APxJYmen1gOGI3oTsGGlic/n5vbdDZ3tHZTQcn9pKHZC0ZGKNHabxJhQ HpVB6Rcvk58bQc/0pSB4eIc7BelYwnwuyLIzJrKRMCDzPzyMGpGH2gTkxXYrKudeAuFs MzV7hGdttRDE3pjLpSnp0mBZ0LYzOJwRebCLz8x1kWGR2XbE4Iyxryhdk1W88YgN45lf 0KyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from; bh=s49cC7IoNvRCECgntq2kb4UIeUisvhZFGqfkCZxUr3Q=; b=Ibf1dCxRk8q8Qwi0noRv/HWRAz6rq5RMx/VNNPlxZsJ/uX0pAcXwQBnCuKAGP8Bhuo 7MAiwA1V8fXBPjbB6ip3yIpICUmMSEcLl6tsDMZpvZarwUctB1z/iQzLEF0mspAzFIjv GELkOo0Yg+9XSu9oqnZ5s6K5HpCl0Xiwh1hbns1UQnDK2NM7baFfGYAICqWyqbdK/6A9 Ct5ck8Xf3tqp4TBTAlga4HNz1A+EYxVVnfkN3EGoPPQG5pwRPqGZBJQBylcXhIFYyV35 F0ebZRK6vtiRQldj6SlVbBbxUkdH6UHVsFlYZMwqVFZGrzrJbXLH48wgyHXmPO7oV23D 2f7g== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o8si10687439oti.47.2019.12.23.09.38.23; Mon, 23 Dec 2019 09:38:34 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726877AbfLWRgq (ORCPT + 99 others); Mon, 23 Dec 2019 12:36:46 -0500 Received: from mga06.intel.com ([134.134.136.31]:7779 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726860AbfLWRgq (ORCPT ); Mon, 23 Dec 2019 12:36:46 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Dec 2019 09:36:45 -0800 X-IronPort-AV: E=Sophos;i="5.69,348,1571727600"; d="scan'208";a="211625969" Received: from unknown (HELO localhost) ([10.249.35.31]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Dec 2019 09:36:42 -0800 From: Jani Nikula To: Kai-Heng Feng , 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: Re: [PATCH v2] drm/i915: Re-init lspcon after HPD if lspcon probe failed In-Reply-To: <20191223171310.21192-1-kai.heng.feng@canonical.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20191223171310.21192-1-kai.heng.feng@canonical.com> Date: Mon, 23 Dec 2019 19:36:39 +0200 Message-ID: <87o8vzrljs.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 24 Dec 2019, 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. > > 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) { With this change, long hpd handling for DDI on platforms that do not have LSPCON, or has an active LSPCON, falls through to the short hpd handling. That's not what you're after, is it? BR, Jani. > 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) { > /* -- Jani Nikula, Intel Open Source Graphics Center