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 3/5] drm/msm/dp: suppress bridge hotplug events during MST operation
Date: Mon, 17 Aug 2026 16:01:36 +0800	[thread overview]
Message-ID: <d4e96255-814e-4fb5-8d97-50126a61c20b@oss.qualcomm.com> (raw)
In-Reply-To: <fozk5fz6bgat55vmlgyvovnmfzabjprna46cmcaoh4jyrwmbtu@k2qtjgip5vg3>



On 7/12/2026 6:44 PM, Dmitry Baryshkov wrote:
> On Mon, Jun 29, 2026 at 10:48:05PM +0800, Yongxing Mou wrote:
>> The DP MST framework already generates the required hotplug events for
>> MST topology changes.
>>
>> Suppress connector hotplug event generation from the bridge connector
>> path while MST is active, and continue propagating HPD notifications to
>> the DP driver.
>>
>> Signed-off-by: Yongxing Mou <yongxing.mou@oss.qualcomm.com>
>> ---
>>   drivers/gpu/drm/display/drm_bridge_connector.c | 6 ++++--
>>   drivers/gpu/drm/msm/dp/dp_display.c            | 9 ++++++++-
> 
> No, it can't go as this. The drm_bridge_connector part should have been
> a part of the first patch.
> 
Got it.
>>   2 files changed, 12 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/display/drm_bridge_connector.c b/drivers/gpu/drm/display/drm_bridge_connector.c
>> index 7334d6677604..82ed0dc450ab 100644
>> --- a/drivers/gpu/drm/display/drm_bridge_connector.c
>> +++ b/drivers/gpu/drm/display/drm_bridge_connector.c
>> @@ -162,6 +162,7 @@ static void drm_bridge_connector_handle_hpd(struct drm_bridge_connector *drm_bri
>>   {
>>   	struct drm_connector *connector = &drm_bridge_connector->base;
>>   	struct drm_device *dev = connector->dev;
>> +	bool send_hotplug = true;
>>   
>>   	/*
>>   	 * IRQ-only notification: extra_status carries the event but
>> @@ -179,9 +180,10 @@ static void drm_bridge_connector_handle_hpd(struct drm_bridge_connector *drm_bri
>>   	connector->status = status;
>>   	mutex_unlock(&dev->mode_config.mutex);
>>   
>> -	drm_bridge_connector_hpd_notify(connector, status, extra_status, NULL);
>> +	drm_bridge_connector_hpd_notify(connector, status, extra_status, &send_hotplug);
>>   
>> -	drm_kms_helper_connector_hotplug_event(connector);
>> +	if (send_hotplug)
>> +		drm_kms_helper_connector_hotplug_event(connector);
> 
> But now I can also see that the idea seems to be incorrect. You are
> preventing the kernel from sending the events, but it doesn't really
> matter. If connection status oscillates, then other components might
> notice it even without the event being sent.
> 
Here our original intent behind suppressing the hotplug was
that, under MST, hotplugs should be sent independently by the MST
framework, rather than being emitted along the IRQ handling path.

Following the extra_status approach you introduced, would it make sense
to let the bridge_connector layer distinguish between long pulses (HPD)
and short pulses (IRQ_HPD) -- a short pulse would not update
connector->status and would not emit a hotplug, only forwarding the
event to the bridge driver. Does this direction sound reasonable to
you?
> 
>>   }
>>   
>>   static void drm_bridge_connector_hpd_cb(void *cb_data,
>> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
>> index 6835c68fe510..bc93b566fbca 100644
>> --- a/drivers/gpu/drm/msm/dp/dp_display.c
>> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
>> @@ -1790,10 +1790,17 @@ void msm_dp_bridge_hpd_notify(struct drm_bridge *bridge,
>>   			msm_dp_hpd_plug_handle(dp);
>>   		} else {
>>   			msm_dp_hpd_plug_handle(dp);
>> +			/* mst_active is set in plug_handle; suppress SST hotplug */
>> +			if (send_hotplug && msm_dp_display->mst_active)
>> +				*send_hotplug = false;
>>   		}
>>   	} else {
>> -		if (hpd_link_status == ISR_DISCONNECTED)
>> +		if (!msm_dp_display->mst_active) {
>>   			msm_dp_hpd_unplug_handle(dp);
>> +		} else if (send_hotplug) {
>> +			msm_dp_hpd_unplug_handle(dp);
>> +			*send_hotplug = false;
> 
> Why? Disconnected events definitely should be reported further.
> 
In MST case, MST DRM framework will send the discconnected hotplug by 
msm_dp_mst_display_set_mgr_state(&dp->msm_dp_display, false);.
>> +		}
>>   	}
>>   
>>   	pm_runtime_put_sync(&msm_dp_display->pdev->dev);
>>
>> -- 
>> 2.43.0
>>
> 



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

Thread overview: 22+ 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-08-18  3:01       ` Dmitry Baryshkov
2026-08-18  2:05   ` Chaoyi Chen
2026-08-18  2:24     ` Dmitry Baryshkov
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-08-18  3:18       ` Dmitry Baryshkov
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 [this message]
2026-08-18  3:22       ` Dmitry Baryshkov
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
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
2026-08-18  3:23       ` Dmitry Baryshkov

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=d4e96255-814e-4fb5-8d97-50126a61c20b@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