From nobody Sat Apr 11 10:48:25 2026 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E772A33F59D for ; Thu, 5 Mar 2026 07:59:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.41 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772697549; cv=none; b=eOTPLkit+LX55v6mDWW9TGL7ElRRkPU2m9pLQCRr8oVWXzcXf0U2KNbri1u4Y4WQhQQU8z0xtS6ZcFfROfIXXlBbQlCSYKdZ+pxESjPoHUwgfnE++uIKrw64VHaB4NPDgP4i/fCcZDqaDtVjMPbzEHHN/pg0aCT3Rcko68DPwQA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772697549; c=relaxed/simple; bh=6WgOaq5p8ZSWxhlf4t6o2HcX6vGXqlzaboJav7KT0Os=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=OYQOjO0S8d6Yx1VLmCOqDMZq1pJXdOSE78CKxC62sywW6VjT69lGHNfEnlrb2FNxBUiwvVkY9E96SbbFXMaYYxwbF/+1Hiv1Kotl2WXXxq8kA+95cqFjRtKXjAsOt8E0DSpei6X0RDo4+v2sFrYYo/QDYVjcoSjaHAgBzsEHTWU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=reject dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=EZRvj3Z5; arc=none smtp.client-ip=209.85.221.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=reject dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EZRvj3Z5" Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-439afc58ac7so4724487f8f.0 for ; Wed, 04 Mar 2026 23:59:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772697546; x=1773302346; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:sender:from:to:cc:subject:date:message-id:reply-to; bh=up1Dq1xg6gmNuKxcZqGmFJ9w/LNCPKzJ4m3SQCOPg0U=; b=EZRvj3Z5b6Zcue32XEU02C5xZSHyxEpNlKuo9ozgYLG6VJlzU1IkORN/grecQr/yQ9 v9sNC5j+k3d+qm89+9G+dWA5uIMCyUXpVoSf2U2avm/lKLtFYTzIzPXH0c5SwYL1+Hr/ JFfFzryXQCnF8y7PzIft2ysEPnafDPFv1IVEomXA11Izsx+rZGCOsdbEuA1G0mLu07PO wAgYoJKmtkHGRxYTtejjuUlEkWUvezPXY1ZgcB/wa3/saVI21yScGBKwItIE/y5SEWj3 feU3H4FInrTRtWt67CGzxKCMcxsZUciXlt1r34qhEy/5EY0AY17H+bdWrULjvf46lRNc Z3Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772697546; x=1773302346; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:sender:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=up1Dq1xg6gmNuKxcZqGmFJ9w/LNCPKzJ4m3SQCOPg0U=; b=GLOARVreKmsm2AxvN0lxPOMhoo1+yrP993vRIaJjwsAm+01NZ2SMVYTkNBysBZdHLT 1EuVR6VBX90lO7G3oKTJOc4JOfkBZJdbnr8yO3LAOwvztwHWsb8x0CRmb1uapoF9h4nN zHpLMdnIcbLtBYV3EMWKcF5JDY4hF5sD/a80j1HshYTbOED5HCJTpmlyeVOUeZW+wGS+ tCf2KiB4Y5OZs+3mQ86pid6xR5QwsBxEwdhyQQxoFN47gR+SJf6rg62hgoL7ZjGcdJ1R NAHkEBCRpCpM+H+Bg7Gy8GkKYNkZGXmLuHcWVfrmL3jsJ0ovWTvtsdaoX6ohX8bOmH96 P9Rw== X-Forwarded-Encrypted: i=1; AJvYcCWsPzOSbHcxHCRu+UOsl6UYAYJEznUK2GSGnaf1bfe+uOTQthQfOcjz66CVNDhtt6Msh/1jdTc5aGvDymk=@vger.kernel.org X-Gm-Message-State: AOJu0YzHUBm/k8Ma/JVcXuBREUn2ST8DsnqZ8zznCZV2evebxDOHPgxX 0ORrUMRgAqCN9OXaVqR4oQMYjRJwQrS9yiPB1S4dGwwJAk6K21IHM8/1 X-Gm-Gg: ATEYQzzXJXnvRbqlmvVsLZjHV604nMzuhCdBilncLI4UND6altBrWBoGFwMiJZZw9hj W3ygOUus0jT5igdM+Q5CazxBld2gZFSWevyCL0iJjmdNVFOq4jIs77yAWF8ygaTn2fGpLKDOcmw nksfGWtTnCQ787iShwU0A2OxIK7cQ/eXxHnDsxGDLwghePdxF/sD3J7v996wF6eIaeMkQCllrEZ E8sj/Ircr7nvIHy7tpx87DHitav1ip548nRVqfIcpz8Dd3zYF3HqIdj7EU/8Huj23vpdLjQXHG/ 0nLxeGWGqEXGllpUSsjr2QvehnpBVTfHZiUI9IrckiQ5zsaalAnhqb3Zwgi9x4OHeNpVU6jrc+D razJgOezmXvlSrDzat21IBrEfgf7HiOS3X33++hG0Xp9I2hPhz1BIWzfeK2ZxpP+yLEahSlKhsi zD0kCV/g== X-Received: by 2002:a05:6000:2c0c:b0:439:905e:1236 with SMTP id ffacd0b85a97d-439c7f99afamr9065426f8f.2.1772697546064; Wed, 04 Mar 2026 23:59:06 -0800 (PST) Received: from localhost ([2001:67c:1562:8007::aac:4468]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439b0549600sm34180087f8f.35.2026.03.04.23.59.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Mar 2026 23:59:05 -0800 (PST) Sender: AceLan Kao From: "Chia-Lin Kao (AceLan)" To: Jani Nikula , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , David Airlie , Simona Vetter , intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/i915/lnl+/tc: Fix false disconnect of active DP-alt TC port during long HPD pulse Date: Thu, 5 Mar 2026 15:58:57 +0800 Message-ID: <20260305075857.40077-1-acelan.kao@canonical.com> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" On platforms using XELPDP+ (Lunar Lake and later), tc_phy_hpd_live_status() reads the PICAINTERRUPT_ISR register to determine DP-alt live status. The XELPDP_DP_ALT_HOTPLUG_MASK bit in this register reflects the live HPD signa= l, which deasserts (goes low) during a long HPD pulse from the sink. When an LTTPR dongle (e.g. HP Type-C to HDMI, 03f0:8a4a) fires a long HPD pulse after link training, intel_tc_port_connected() reads PICAINTERRUPT_ISR and returns false even though the PHY is still owned and the link is active. Since intel_tc_port_handles_hpd_glitches() returns true for TC dp-alt ports, the 4ms glitch-filter retry loop in intel_digital_port_connected_locked() is bypassed immediately, giving no protection against this transient deasserti= on. The AUX abort logic then fires (-ENXIO), the hotplug handler marks DP-1 as disconnected, and the compositor responds by disabling eDP-1, causing the internal display to disappear. Fix this by trusting the PHY ownership register (XELPDP_PORT_BUF_CTL1 & XELPDP_TC_PHY_OWNERSHIP) over the transient HPD live status in intel_tc_port_connected() when the port has an active link (link_refcount > 0). The ownership register is stable and does not toggle during HPD pulses. The TC cold power domain is guaranteed to be held when link_refcount > 0, as __intel_tc_port_lock() already asserts and verifies this via tc_phy_is_o= wned() before we reach intel_tc_port_connected(). Without this fix, triggering mirror mode via hotkey on HP ZBook with HP Typ= e-C to HDMI dongle (03f0:8a4a) causes: [drm:intel_dp_hpd_pulse] got hpd irq on [ENCODER:270:DDI TC1/PHY TC1] - l= ong [drm:intel_tc_port_update_mode] Port D/TC#1: TC port mode reset (disconne= cted -> tbt-alt) [drm:intel_dp_hpd_pulse] got hpd irq on [ENCODER:270:DDI TC1/PHY TC1] - l= ong [drm:intel_hotplug_detect_connector] [CONNECTOR:271:DP-1] status updated = from connected to disconnected With this fix, the port correctly stays in DP-alt mode: [drm:intel_tc_port_update_mode] Port D/TC#1: TC port mode reset (dp-alt -= > disconnected) [drm:intel_tc_port_update_mode] Port D/TC#1: TC port mode reset (disconne= cted -> dp-alt) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/gpu/drm/i915/display/intel_tc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_tc.c b/drivers/gpu/drm/i915= /display/intel_tc.c index bd12148e42f70..0967cfc75f522 100644 --- a/drivers/gpu/drm/i915/display/intel_tc.c +++ b/drivers/gpu/drm/i915/display/intel_tc.c @@ -1732,6 +1732,11 @@ bool intel_tc_port_connected(struct intel_encoder *e= ncoder) if (tc->mode !=3D TC_PORT_DISCONNECTED) mask =3D BIT(tc->mode); =20 + if (tc->link_refcount > 0 && + tc->mode =3D=3D TC_PORT_DP_ALT && + tc_phy_is_owned(tc)) + return true; + return tc_phy_hpd_live_status(tc) & mask; } =20 --=20 2.51.0