Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp6219480ybl; Mon, 23 Dec 2019 02:12:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxPbcL/Kw1lpBv6/QZe1cm1dWhbRuVgwY4klZbk+TLezX+6OZVKAnQN8OqQqsZM0RYVMtO3 X-Received: by 2002:a05:6830:1cc5:: with SMTP id p5mr6532657otg.218.1577095949461; Mon, 23 Dec 2019 02:12:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577095949; cv=none; d=google.com; s=arc-20160816; b=WkisL+q01ULp4Qidjgw5Ik5wnAzIuYNFjqq4YXnN768Bhy7s5DW5JOnMg1P7BqJt3i FMK4fYeInU5frNMiM9OiFbLebwijIbZwF+47teGGQBwq+8imF7K7aDUTqBqqLs92+AwJ ppTINB85V7xCj3dzPJZ4yn4g5tJaVXJc75XVef7fqPCW/ZC8+D2Qzv3CS1JvqWi/ZmQV qrZ/8/gF288+3ea/YLeXvhyvxKb03ja7RXNT6w3BMeKjCKrl3h+Yi8J79JvENxwY/0hS f17qKIRSbbVlT1HZk7y41AIF3JUzaGycAXgdUPBkLxg6SU+UGdfPgfjBh2mjObwRn0yt xwyw== 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=PQL4mBdaAXbAqOfw/PCPiQNMquspWvWJN9ImkGVelEU=; b=TdR0PN+9Klq0R/dEWa1CBRxJSWeVlHSbShncot1VFr4BOcFHeT4l6/XxnKnxSTw2v6 OFb/a/42A5vyYgXmki+CJGN/Qi7rZD7RCpsdxvc/qBEVKIIRw8BJYmINtKtoKwNRyJY/ QPTL/HCOKkvJwS4+6GB7AaXuyyMAdRGoMIbLkNVe2Hjwp00XacUUtWIZ1tGYnkBfjFn1 jw1l8HTqTJztwWAJxO2KE3L8TCj87xDaingYttj3QgZ/8+XTYGwIWpybfe+Cnl8hZp9V Uc4tt5TaNpPOxFtW5YQHMsoLxjxdLG/eeDA9Zo1j2Myjcgj9oEpIMc3gX3mDktzG7REc N9PA== 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 i5si9625425oif.211.2019.12.23.02.12.17; Mon, 23 Dec 2019 02:12:29 -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 S1726754AbfLWKLW (ORCPT + 99 others); Mon, 23 Dec 2019 05:11:22 -0500 Received: from mga11.intel.com ([192.55.52.93]:43940 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726150AbfLWKLW (ORCPT ); Mon, 23 Dec 2019 05:11:22 -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 fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Dec 2019 02:11:21 -0800 X-IronPort-AV: E=Sophos;i="5.69,347,1571727600"; d="scan'208";a="211511893" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Dec 2019 02:11:18 -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] drm/i915: Re-init lspcon after HPD if lspcon probe failed In-Reply-To: <20191223095604.17453-1-kai.heng.feng@canonical.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20191223095604.17453-1-kai.heng.feng@canonical.com> Date: Mon, 23 Dec 2019 12:11:15 +0200 Message-ID: <87eewvwdvg.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 Mon, 23 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. > > 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); The whole digport work function is platform and encoder agnostic, this call has no place in here. One alternative is intel_dp_hpd_pulse(). BR, Jani. > > ret = dig_port->hpd_pulse(dig_port, long_hpd); > if (ret == IRQ_NONE) { -- Jani Nikula, Intel Open Source Graphics Center