Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
To: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Rob Clark <robin.clark@oss.qualcomm.com>,
	Dmitry Baryshkov <lumag@kernel.org>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Jessica Zhang <jesszhan0024@gmail.com>,
	Sean Paul <sean@poorly.run>,
	Marijn Suijten <marijn.suijten@somainline.org>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-amlogic@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org
Subject: Re: [PATCH 4/5] drm/msm/dp: report IRQ_HPD as an IRQ-only notification
Date: Mon, 17 Aug 2026 16:02:11 +0800	[thread overview]
Message-ID: <2351cc75-ccf8-4ff0-a558-c29ccd2b86b9@oss.qualcomm.com> (raw)
In-Reply-To: <zmnftag6s6mxvnoqdzouhpdcbwscm6sfzrqkzgwrcptgbr53cx@jetw2gtov7qp>



On 7/12/2026 6:55 PM, Dmitry Baryshkov wrote:
> On Mon, Jun 29, 2026 at 10:48:06PM +0800, Yongxing Mou wrote:
>> MST reuses the SST connector bridge to propagate HPD IRQ events through
>> the bridge chain.
>>
>> For IRQ_HPD notifications there is no connector state transition to
>> report. Use connector_status_unknown together with
>> DRM_CONNECTOR_DP_IRQ_HPD so that the bridge connector framework treats
>> them as IRQ-only notifications and forwards them without modifying
>> connector state.
>>
>> The DP driver handles IRQ_HPD events based on
>> DRM_CONNECTOR_DP_IRQ_HPD rather than connector status transitions.
>>
>> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
>> ---
>>   drivers/gpu/drm/msm/dp/dp_display.c   | 22 +++++++++-------------
>>   drivers/soc/qcom/pmic_glink_altmode.c | 14 +++++++++-----
> 
> And which tree (and why) would be able to merge this patch?
> 
Emm , I will split the patch and reorganize it.
>>   2 files changed, 18 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
>> index bc93b566fbca..4ee391cc7165 100644
>> --- a/drivers/gpu/drm/msm/dp/dp_display.c
>> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
>> @@ -1119,14 +1119,10 @@ static irqreturn_t msm_dp_display_irq_thread(int irq, void *dev_id)
>>   		drm_bridge_hpd_notify(dp->msm_dp_display.bridge,
>>   				      connector_status_connected);
>>   
>> -	/* Send HPD as connected and distinguish it in the notifier */
>> -	if (hpd_isr_status & DP_DP_IRQ_HPD_INT_MASK) {
>> -		if (dp->msm_dp_display.mst_active)
>> -			msm_dp_irq_hpd_handle(dp);
>> -		else
>> -			drm_bridge_hpd_notify(dp->msm_dp_display.bridge,
>> -					      connector_status_connected);
>> -	}
>> +	if (hpd_isr_status & DP_DP_IRQ_HPD_INT_MASK)
>> +		drm_bridge_hpd_notify_extra(dp->msm_dp_display.bridge,
>> +					    connector_status_unknown,
> 
> It's _not_ unknown.
> 
Same as my reply to 2/5 -- the status is indeed not unknown here, and
using connector_status_unknown as a sentinel in v1 is not appropriate.
I will fix this in v2 along the direction discussed on 2/5.
>> +					    DRM_CONNECTOR_DP_IRQ_HPD);
> 
> This should be fixed in the MST patchset. You should not be doing any
> actual handling in the ISR routing.
> 
>>   
>>   	ret = IRQ_HANDLED;
>>   
>> @@ -1781,11 +1777,11 @@ void msm_dp_bridge_hpd_notify(struct drm_bridge *bridge,
>>   	drm_dbg_dp(dp->drm_dev, "type=%d link hpd_link_status=0x%x, status=%d\n",
>>   		   msm_dp_display->connector_type, hpd_link_status, status);
>>   
>> -	if (status == connector_status_connected) {
>> -		if (hpd_link_status == ISR_IRQ_HPD_PULSE_COUNT ||
>> -		    extra_status == DRM_CONNECTOR_DP_IRQ_HPD) {
>> -			msm_dp_irq_hpd_handle(dp);
>> -		} else if (hpd_link_status == ISR_HPD_REPLUG_COUNT) {
>> +	if (extra_status == DRM_CONNECTOR_DP_IRQ_HPD ||
>> +	    hpd_link_status == ISR_IRQ_HPD_PULSE_COUNT) {
>> +		msm_dp_irq_hpd_handle(dp);
> 
> ANd here you missed the case when IRQ_HPD is being reported together
> with the first HPD event.
> 
Yes, will fix it next patchset.
>> +	} else if (status == connector_status_connected) {
>> +		if (hpd_link_status == ISR_HPD_REPLUG_COUNT) {
>>   			msm_dp_hpd_unplug_handle(dp);
>>   			msm_dp_hpd_plug_handle(dp);
>>   		} else {
>> diff --git a/drivers/soc/qcom/pmic_glink_altmode.c b/drivers/soc/qcom/pmic_glink_altmode.c
>> index 946eb20b8f83..28ab8cbb5ef9 100644
>> --- a/drivers/soc/qcom/pmic_glink_altmode.c
>> +++ b/drivers/soc/qcom/pmic_glink_altmode.c
>> @@ -373,11 +373,15 @@ static void pmic_glink_altmode_worker(struct work_struct *work)
>>   		else
>>   			conn_status = connector_status_disconnected;
>>   
>> -		drm_aux_hpd_bridge_notify_extra(&alt_port->bridge->dev,
>> -						conn_status,
>> -						alt_port->hpd_irq ?
>> -						DRM_CONNECTOR_DP_IRQ_HPD :
>> -						DRM_CONNECTOR_NO_EXTRA_STATUS);
>> +		if (alt_port->hpd_irq) {
>> +			drm_aux_hpd_bridge_notify_extra(&alt_port->bridge->dev,
>> +							connector_status_unknown,
> 
> And this is completely wrong. The AltMode driver (btw, you also missed
> the normal altmode driver for DP) doesn't know if it should handle the
> events in some way. It should report the HPD and IRQ_HPD as is.
> 
Will fix it next patchset .
>> +							DRM_CONNECTOR_DP_IRQ_HPD);
>> +		} else {
>> +			drm_aux_hpd_bridge_notify_extra(&alt_port->bridge->dev,
>> +							conn_status,
>> +							DRM_CONNECTOR_NO_EXTRA_STATUS);
>> +		}
>>   	} else if (alt_port->mux_ctrl == MUX_CTRL_STATE_TUNNELING) {
>>   		if (alt_port->svid == USB_TYPEC_TBT_SID)
>>   			pmic_glink_altmode_enable_tbt(altmode, alt_port);
>>
>> -- 
>> 2.43.0
>>
> 



  reply	other threads:[~2026-08-17  8:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 14:48 [PATCH 0/5] drm/msm/dp: Add MSM Type-C MST support Yongxing Mou
2026-06-29 14:48 ` [PATCH 1/5] drm/bridge: allow hpd_notify() to suppress connector hotplug events Yongxing Mou
2026-07-12 10:21   ` Dmitry Baryshkov
2026-08-17  8:01     ` Yongxing Mou
2026-06-29 14:48 ` [PATCH 2/5] drm/bridge_connector: preserve connector status for IRQ-only HPD events Yongxing Mou
2026-07-12 10:33   ` Dmitry Baryshkov
2026-08-17  8:02     ` Yongxing Mou
2026-06-29 14:48 ` [PATCH 3/5] drm/msm/dp: suppress bridge hotplug events during MST operation Yongxing Mou
2026-07-12 10:44   ` Dmitry Baryshkov
2026-08-17  8:01     ` Yongxing Mou
2026-06-29 14:48 ` [PATCH 4/5] drm/msm/dp: report IRQ_HPD as an IRQ-only notification Yongxing Mou
2026-07-12 10:55   ` Dmitry Baryshkov
2026-08-17  8:02     ` Yongxing Mou [this message]
2026-06-29 14:48 ` [PATCH 5/5] drm/msm/dp: mark the SST connector disconnected when MST is enabled Yongxing Mou
2026-07-12 10:56   ` Dmitry Baryshkov
2026-08-17  8:01     ` Yongxing Mou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2351cc75-ccf8-4ff0-a558-c29ccd2b86b9@oss.qualcomm.com \
    --to=yongxing.mou@oss.qualcomm.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=andrzej.hajda@intel.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=jbrunet@baylibre.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jesszhan0024@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=khilman@baylibre.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marijn.suijten@somainline.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox