From: Kuogee Hsieh <quic_khsieh@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: <dri-devel@lists.freedesktop.org>, <robdclark@gmail.com>,
<sean@poorly.run>, <swboyd@chromium.org>, <dianders@chromium.org>,
<vkoul@kernel.org>, <daniel@ffwll.ch>, <airlied@gmail.com>,
<agross@kernel.org>, <andersson@kernel.org>,
<quic_abhinavk@quicinc.com>, <quic_jesszhan@quicinc.com>,
<quic_sbillaka@quicinc.com>, <marijn.suijten@somainline.org>,
<freedreno@lists.freedesktop.org>,
<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes
Date: Mon, 18 Sep 2023 13:16:16 -0700 [thread overview]
Message-ID: <f855b3db-2754-5f66-9fc2-061a517814ef@quicinc.com> (raw)
In-Reply-To: <CAA8EJprG8HuhDHV9k5_4+vkejnYmwmg61isZXT7EsBCbGP0pJA@mail.gmail.com>
On 9/15/2023 5:41 PM, Dmitry Baryshkov wrote:
> On Sat, 16 Sept 2023 at 00:38, Kuogee Hsieh <quic_khsieh@quicinc.com> wrote:
>> Currently DP driver use drm_helper_hpd_irq_event(), bypassing drm bridge
>> framework, to report HPD status changes to user space frame work.
>> Replace it with drm_bridge_hpd_notify() since DP driver is part of drm
>> bridge.
>>
>> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>
> Also see the comment below.
>
>> ---
>> drivers/gpu/drm/msm/dp/dp_display.c | 20 ++------------------
>> 1 file changed, 2 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
>> index 18d16c7..59f9d85 100644
>> --- a/drivers/gpu/drm/msm/dp/dp_display.c
>> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
>> @@ -356,26 +356,10 @@ static bool dp_display_is_sink_count_zero(struct dp_display_private *dp)
>> (dp->link->sink_count == 0);
>> }
>>
>> -static void dp_display_send_hpd_event(struct msm_dp *dp_display)
>> -{
>> - struct dp_display_private *dp;
>> - struct drm_connector *connector;
>> -
>> - dp = container_of(dp_display, struct dp_display_private, dp_display);
>> -
>> - connector = dp->dp_display.connector;
>> - drm_helper_hpd_irq_event(connector->dev);
>> -}
>> -
>> static int dp_display_send_hpd_notification(struct dp_display_private *dp,
>> bool hpd)
>> {
>> - if ((hpd && dp->dp_display.link_ready) ||
>> - (!hpd && !dp->dp_display.link_ready)) {
>> - drm_dbg_dp(dp->drm_dev, "HPD already %s\n",
>> - (hpd ? "on" : "off"));
>> - return 0;
>> - }
>> + struct drm_bridge *bridge = dp->dp_display.bridge;
>>
>> /* reset video pattern flag on disconnect */
>> if (!hpd)
> Note, this part (resetting the video_test and setting of is_connected)
> should be moved to the dp_bridge_hpd_notify() too. Please ignore this
> comment if this is handled later in the series.
I think keep them here is better since eDP does not populate hpd_enable,
hpd_disable and hpd_notify at edp_bridge_ops at drm_bridge_attach().
Keep them here will work for both eDP and DP.
>
>
>> @@ -385,7 +369,7 @@ static int dp_display_send_hpd_notification(struct dp_display_private *dp,
>>
>> drm_dbg_dp(dp->drm_dev, "type=%d hpd=%d\n",
>> dp->dp_display.connector_type, hpd);
>> - dp_display_send_hpd_event(&dp->dp_display);
>> + drm_bridge_hpd_notify(bridge, dp->dp_display.link_ready);
>>
>> return 0;
>> }
>> --
>> 2.7.4
>>
>
next prev parent reply other threads:[~2023-09-18 20:16 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-15 21:38 [PATCH v3 0/7] incorporate pm runtime framework and eDP clean up Kuogee Hsieh
2023-09-15 21:38 ` [PATCH v3 1/7] drm/msm/dp: tie dp_display_irq_handler() with dp driver Kuogee Hsieh
2023-09-16 0:29 ` Dmitry Baryshkov
2023-09-18 17:02 ` Kuogee Hsieh
2023-09-19 9:44 ` Dmitry Baryshkov
2023-09-22 23:02 ` Kuogee Hsieh
2023-09-23 18:45 ` Dmitry Baryshkov
2023-09-27 15:25 ` Kuogee Hsieh
2023-09-15 21:38 ` [PATCH v3 2/7] drm/msm/dp: replace is_connected with link_ready Kuogee Hsieh
2023-09-16 1:51 ` Dmitry Baryshkov
2023-09-18 17:09 ` Kuogee Hsieh
2023-09-19 9:44 ` Dmitry Baryshkov
2023-09-15 21:38 ` [PATCH v3 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes Kuogee Hsieh
2023-09-16 0:41 ` Dmitry Baryshkov
2023-09-18 20:16 ` Kuogee Hsieh [this message]
2023-09-19 9:45 ` Dmitry Baryshkov
2023-09-15 21:38 ` [PATCH v3 4/7] drm/msm/dp: incorporate pm_runtime framework into DP driver Kuogee Hsieh
2023-09-16 1:07 ` Dmitry Baryshkov
2023-09-20 22:46 ` Kuogee Hsieh
2023-09-25 9:06 ` Dmitry Baryshkov
2023-09-16 5:25 ` kernel test robot
2023-09-15 21:38 ` [PATCH v3 5/7] drm/msm/dp: delete EV_HPD_INIT_SETUP Kuogee Hsieh
2023-09-16 1:09 ` Dmitry Baryshkov
2023-09-15 21:38 ` [PATCH v3 6/7] drm/msm/dp: add pm_runtime_force_suspend()/resume() Kuogee Hsieh
2023-09-16 1:21 ` Dmitry Baryshkov
2023-09-18 17:47 ` Kuogee Hsieh
2023-09-19 9:50 ` Dmitry Baryshkov
2023-09-20 19:49 ` Kuogee Hsieh
2023-09-22 21:54 ` Stephen Boyd
2023-09-23 1:35 ` Abhinav Kumar
2023-09-25 16:07 ` Kuogee Hsieh
2023-09-27 22:01 ` Stephen Boyd
2023-09-27 22:04 ` Dmitry Baryshkov
2023-09-29 0:46 ` Abhinav Kumar
2023-10-02 22:58 ` Stephen Boyd
2023-10-03 1:32 ` Abhinav Kumar
2023-10-03 8:00 ` Dmitry Baryshkov
2023-09-27 21:41 ` Stephen Boyd
2023-09-28 22:35 ` Abhinav Kumar
2023-09-15 21:38 ` [PATCH v3 7/7] drm/msm/dp: move of_dp_aux_populate_bus() to eDP probe() Kuogee Hsieh
2023-09-16 1:48 ` 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=f855b3db-2754-5f66-9fc2-061a517814ef@quicinc.com \
--to=quic_khsieh@quicinc.com \
--cc=agross@kernel.org \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=quic_jesszhan@quicinc.com \
--cc=quic_sbillaka@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=swboyd@chromium.org \
--cc=vkoul@kernel.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®