From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta1.migadu.com (out-171.mta1.migadu.com [95.215.58.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 772EA19DFAB for ; Sun, 15 Mar 2026 01:10:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773537057; cv=none; b=kGDvVe4F9LzD5TPm6FRfXDFtROiaqG5kYVaYQ+ELpq3SM6jxRmnHqfqzK5rqrZf6EJGUzGazwOzkbCae27D4HgiPIijC08x33E5/e0tIbEqKkOjmyilhpOAffkMx8mDP7oeCAjc4HmA+cYMqGXuFAdlg+xxu0D724HHWHfxd1fw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773537057; c=relaxed/simple; bh=3nRRNPYLErfflMV9/mB3oHuDOky3TPQ9fThXjoPbOyY=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=UA5ucjL0TpGhkfnTSTsnWFQwxO8Z6DBg/QcvS9HmBMDHoM6Nze5QXiDLMigAHpsVlqfLURu3xoSwqBW0RWnUXKXMl9y37NSTMYMuJkfw9gM+AQcfOwrln2MephdihB2GTfO2HNoC7TR20tdEPrNQnA1gh/lu4NmKkHBRbDejqus= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=packett.cool; spf=pass smtp.mailfrom=packett.cool; dkim=pass (2048-bit key) header.d=packett.cool header.i=@packett.cool header.b=Yhg6erNA; arc=none smtp.client-ip=95.215.58.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=packett.cool Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=packett.cool Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=packett.cool header.i=@packett.cool header.b="Yhg6erNA" Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=packett.cool; s=key1; t=1773537043; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+M2XqJARgeruA5d7QVU8YedDhdC+J9lANvOsOGmSaa8=; b=Yhg6erNAzKMdqlQPS1Nb0IKtxcaawk5s6Sk5aNdYCAb9qp240eoN0ifGv/odNOgnbs1K0n kvjFuDRAP399aafLtSjZwNfx5Qy6ld/1uaGC6hfQrWYolhSKkPWnrnKgNnTuq/+hpAISx5 OKIq0f4UFQzX3VU+EMBiCWuI67r0vXiGu6XPstSgsJ8Lv5XirrtGxxt4su4EiIuVgTnzTO BkGvmmWcZPNhFd+6g/aRSjmccBOZwdWNHK8YiTSyUPhgNnJgkHsROBzHyo3dWzW8JOXEdP f51Ni8RZToT0AAcGzsP2c9EX0efujnjKFckPv5lgmLW36KtEk5NQkb+zScKC5Q== Date: Sat, 14 Mar 2026 22:10:26 -0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v5 00/10] drm/msm/dp: Drop the HPD state machine X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Val Packett To: Dmitry Baryshkov , Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Kuogee Hsieh , Yongxing Mou Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20260314-hpd-refactor-v5-0-0c8450737d64@oss.qualcomm.com> <9c4dad2c-25bd-47d2-bc40-9b551d023615@packett.cool> Content-Language: en-US In-Reply-To: <9c4dad2c-25bd-47d2-bc40-9b551d023615@packett.cool> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 3/14/26 9:51 PM, Val Packett wrote: > > On 3/13/26 10:09 PM, Dmitry Baryshkov wrote: >> Currently, all HPD interrupt handling must go through the HPD state >> machine. >> >> This has caused many issues where the DRM framework assumes that DP is >> in one state while the state machine is stuck in another state. >> >> As discussed here [1], this series: >> >> - Removes the state machine >> - Moves link training to atomic_enable() >> - Changes the detect() behavior to return true if a display is >> physically >>    plugged in (as opposed to if the DP link is ready). >> - Remove event queue and move internal HPD handling to hpd_notify() >> >> To correctly detect the displays which are plugged on boot on the boards >> which use dp-connector devices, this series depends on [2]. USB-C and >> eDP panels are handled natively. >> >> [1] >> https://patchwork.freedesktop.org/patch/656312/?series=142010&rev=2#comment_1201738 >> [2] >> https://lore.kernel.org/all/20260314-dp-connector-hpd-v1-0-786044cedc17@oss.qualcomm.com/ > > Unfortunately this currently seems to mostly break link training with > USB-C, on x1e80100-dell-latitude-7455: > > [  102.190083] [drm:msm_dp_ctrl_link_train_1_2 [msm]] *ERROR* link > training #2 on phy 1 failed. ret=-110 > [  102.192846] [drm:msm_dp_ctrl_setup_main_link [msm]] *ERROR* link > training of LTTPR(s) failed. ret=-110 > [  102.211095] [drm:msm_dp_bridge_atomic_enable [msm]] *ERROR* Failed > link training (rc=-104) > [  102.211164] [drm:msm_dp_aux_isr [msm]] *ERROR* Unexpected DP AUX > IRQ 0x01000000 when not busy > [  102.247168] [drm:msm_dp_ctrl_link_train_1_2 [msm]] *ERROR* link > training #2 on phy 1 failed. ret=-110 > [  102.252859] [drm:msm_dp_ctrl_setup_main_link [msm]] *ERROR* link > training of LTTPR(s) failed. ret=-110 > > [..] Actually looks like that might've been due to having applied the [2] dp-connector series from above. Removed it and rebooted, now plugging and unplugging multiple times between the 2 ports works fine. Except unplug is still not reliable, the "ghost" monitor often remains after unplugging. Almost nothing is logged to dmesg, literally I've only seen this line once: [drm:msm_dp_panel_read_sink_caps [msm]] *ERROR* panel edid read failed But I have unplugged the monitor now and I still see: crtc[108]: crtc-1         enable=1         active=1         self_refresh_active=0         planes_changed=1         mode_changed=0         active_changed=0         connectors_changed=0         color_mgmt_changed=0         plane_mask=2         connector_mask=2         encoder_mask=2         mode: "3840x2560": 60 631750 3840 3888 3920 4000 2560 2563 2573 2633 0x48 0x9         lm[0]=2         ctl[0]=1         lm[1]=3         ctl[1]=1 connector[38]: DP-2         crtc=crtc-1         [..] and the compositor thinks it's still present, I can move the mouse to where the screen was etc. ~val