From: Abhinav Kumar <quic_abhinavk@quicinc.com>
To: Bjorn Andersson <andersson@kernel.org>
Cc: <freedreno@lists.freedesktop.org>,
Rob Clark <robdclark@gmail.com>,
"Dmitry Baryshkov" <dmitry.baryshkov@linaro.org>,
Sean Paul <sean@poorly.run>,
"Marijn Suijten" <marijn.suijten@somainline.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Kuogee Hsieh <quic_khsieh@quicinc.com>,
<dri-devel@lists.freedesktop.org>, <seanpaul@chromium.org>,
<swboyd@chromium.org>, <quic_jesszhan@quicinc.com>,
<quic_bjorande@quicinc.com>, <johan@kernel.org>,
<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] drm/msm/dp: call dp_hpd_plug_handle()/unplug_handle() directly for external HPD
Date: Mon, 8 Apr 2024 12:43:34 -0700 [thread overview]
Message-ID: <01cb1c0d-a801-37f9-2f55-2bbd8d3a68b9@quicinc.com> (raw)
In-Reply-To: <ale6wbwzkfagcg2q6glb4vsxu3pthhkk3tquv2ixlatbdryqvh@xscsq2h6emho>
On 4/7/2024 11:48 AM, Bjorn Andersson wrote:
> On Fri, Apr 05, 2024 at 08:15:47PM -0700, Abhinav Kumar wrote:
>> From: Kuogee Hsieh <quic_khsieh@quicinc.com>
> [..]
>> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
>> index d80f89581760..bfb6dfff27e8 100644
>> --- a/drivers/gpu/drm/msm/dp/dp_display.c
>> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
>> @@ -1665,7 +1665,7 @@ void dp_bridge_hpd_notify(struct drm_bridge *bridge,
>> return;
>>
>> if (!dp_display->link_ready && status == connector_status_connected)
>> - dp_add_event(dp, EV_HPD_PLUG_INT, 0, 0);
>> + dp_hpd_plug_handle(dp, 0);
>
> If I read the code correctly, and we get an external connect event
> inbetween a previous disconnect and the related disable call, this
> should result in a PLUG_INT being injected into the queue still.
>
> Will that not cause the same problem?
>
> Regards,
> Bjorn
>
Yes, your observation is correct and I had asked the same question to
kuogee before taking over this change and posting.
We will have to handle that case separately. I don't have a good
solution yet for it without requiring further rework or we drop the
below snippet.
if (state == ST_DISCONNECT_PENDING) {
/* wait until ST_DISCONNECTED */
dp_add_event(dp, EV_HPD_PLUG_INT, 0, 1); /* delay = 1 */
mutex_unlock(&dp->event_mutex);
return 0;
}
I will need sometime to address that use-case as I need to see if we can
handle that better and then drop the the DISCONNECT_PENDING state to
address this fully. But it needs more testing.
But, we will need this patch anyway because without this we will not be
able to fix even the most regular and commonly seen case of basic
connect/disconnect receiving complementary events.
>> else if (dp_display->link_ready && status == connector_status_disconnected)
>> - dp_add_event(dp, EV_HPD_UNPLUG_INT, 0, 0);
>> + dp_hpd_unplug_handle(dp, 0);
>> }
>> --
>> 2.43.2
>>
next prev parent reply other threads:[~2024-04-08 19:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-06 3:15 Abhinav Kumar
2024-04-07 2:03 ` Dmitry Baryshkov
2024-04-07 18:48 ` Bjorn Andersson
2024-04-08 19:43 ` Abhinav Kumar [this message]
2024-04-08 20:41 ` Bjorn Andersson
2024-04-08 21:08 ` Abhinav Kumar
2024-04-08 21:13 ` Dmitry Baryshkov
2024-04-08 21:17 ` Abhinav Kumar
2024-04-08 22:09 ` Dmitry Baryshkov
2024-04-08 21:12 ` Dmitry Baryshkov
2024-04-08 21:23 ` Abhinav Kumar
2024-04-08 22:07 ` Dmitry Baryshkov
2024-04-09 2:33 ` Bjorn Andersson
2024-04-09 14:39 ` 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=01cb1c0d-a801-37f9-2f55-2bbd8d3a68b9@quicinc.com \
--to=quic_abhinavk@quicinc.com \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=johan@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_bjorande@quicinc.com \
--cc=quic_jesszhan@quicinc.com \
--cc=quic_khsieh@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=seanpaul@chromium.org \
--cc=swboyd@chromium.org \
/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
all inboxes | Powered by JetHome®