Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6207087ybl; Mon, 23 Dec 2019 01:58:23 -0800 (PST) X-Google-Smtp-Source: APXvYqwT0lPUBEYv0j+TnxsiecuLYeEbFJfc1kpym1o4P17hOyuaxJe91/tIjjMnTaTIK5LHx2/G X-Received: by 2002:a9d:480b:: with SMTP id c11mr17692281otf.283.1577095103558; Mon, 23 Dec 2019 01:58:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577095103; cv=none; d=google.com; s=arc-20160816; b=WdgxiURZlZnPsGAaMj6udLXTa/Cd4rrjWqa+9KacPUCNvwThcR+vOSyP7zuY3G5w71 OpoiEoBmlf4j20TPn+vD0A6aiCFIGy8p5FatGjoy7RKngqFKDq9UoRmNFvCLneXhFlN3 sznC3gYOB8LUnLLpxr2N5gv5AwrS7QcecbjRjOebZtV3+r2pcx5/hQ7nDZr2JlP0v2i2 GY2NbghHieBM4JChVWeO5n2iVcIqcgDKFAtHL9RvjIPzSqOCsNBYJwl6HrWEH6q17O0h o1onTUd+Uwb1du2sII3H1eBbL5V0uEM13GXHe6BuT/V2KxHfg0jh+kmFQeDh3rwnmRuc v+7w== 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=KEgJ7Qc9KEXgOP8k2//uhj7r7rGMedt93FFssk7/VYk=; b=LShx8oGloskVSMsbCJByX3CNzWFkAfyOY7BUGMdYaoyudmOGmUKQFgfpf47v9dtfQy FTNwJSvmuLK+sofHoXsAelC/7mHUxlMSLvnaVuR9hEWGtQVPdAng3kFkW6bsz2f0Ur6T 0keDDkYHrzr2L0b+0CUjv5IEtgEd25WYKGFxD4IaLB2Sy2DB65VKVgksCd++rxEHAiOY AXl8ZQC04udS6pmFn3pQkOihTVjwAF2gEi3DFUoA2AwdB+/6lUxh0vSg0rCIS2PWAL/g fjkc7QqqT6FOmrprPOM7L2AmQpUroHBK6JwEeyRXaXFfQFwluJjb8QuLrW1nSC8HKdMb mKsQ== 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 z1si9601584otm.242.2019.12.23.01.58.11; Mon, 23 Dec 2019 01:58:23 -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 S1726867AbfLWJ4T (ORCPT + 99 others); Mon, 23 Dec 2019 04:56:19 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:57146 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726691AbfLWJ4T (ORCPT ); Mon, 23 Dec 2019 04:56:19 -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 1ijKRd-0000gm-2L; Mon, 23 Dec 2019 09:56:09 +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] drm/i915: Re-init lspcon after HPD if lspcon probe failed Date: Mon, 23 Dec 2019 17:56:04 +0800 Message-Id: <20191223095604.17453-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. Closes: https://gitlab.freedesktop.org/drm/intel/issues/203 Signed-off-by: Kai-Heng Feng --- drivers/gpu/drm/i915/display/intel_hotplug.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_hotplug.c b/drivers/gpu/drm/i915/display/intel_hotplug.c index fc29046d48ea..e2862e36d0bf 100644 --- a/drivers/gpu/drm/i915/display/intel_hotplug.c +++ b/drivers/gpu/drm/i915/display/intel_hotplug.c @@ -28,6 +28,7 @@ #include "i915_drv.h" #include "intel_display_types.h" #include "intel_hotplug.h" +#include "intel_lspcon.h" /** * DOC: Hotplug @@ -336,6 +337,8 @@ static void i915_digport_work_func(struct work_struct *work) continue; dig_port = enc_to_dig_port(&encoder->base); + if (HAS_LSPCON(dev_priv) && !dig_port->lspcon.active) + lspcon_init(dig_port); ret = dig_port->hpd_pulse(dig_port, long_hpd); if (ret == IRQ_NONE) { -- 2.17.1