From: Kuogee Hsieh <quic_khsieh@quicinc.com> To: Stephen Boyd <swboyd@chromium.org>, <agross@kernel.org>, <airlied@linux.ie>, <bjorn.andersson@linaro.org>, <daniel@ffwll.ch>, <dmitry.baryshkov@linaro.org>, <dri-devel@lists.freedesktop.org>, <robdclark@gmail.com>, <sean@poorly.run>, <vkoul@kernel.org> Cc: <quic_abhinavk@quicinc.com>, <aravindh@codeaurora.org>, <quic_sbillaka@quicinc.com>, <freedreno@lists.freedesktop.org>, <linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org> Subject: Re: [PATCH v11 1/4] drm/msm/dp: do not initialize phy until plugin interrupt received Date: Thu, 13 Jan 2022 14:14:27 -0800 [thread overview] Message-ID: <c190bd82-b6d3-b6a9-3e58-32c8d9d417c1@quicinc.com> (raw) In-Reply-To: <CAE-0n53qxer=shY3LdxzDPFaQb1L65okX9TM0TXYCdD59qau5g@mail.gmail.com> On 1/13/2022 1:52 PM, Stephen Boyd wrote: > Quoting Kuogee Hsieh (2022-01-13 12:44:16) >> On 1/13/2022 11:47 AM, Stephen Boyd wrote: >>> Quoting Kuogee Hsieh (2022-01-13 09:51:42) >>>> On 1/12/2022 8:13 PM, Stephen Boyd wrote: >>>>>>>> - if (dp->usbpd->orientation == ORIENTATION_CC2) >>>>>>>> - flip = true; >>>>>>>> + dp_power_init(dp->power, false); >>>>>>>> + dp_ctrl_reset_irq_ctrl(dp->ctrl, true); >>>>>>>> + >>>>>>>> + /* >>>>>>>> + * eDP is the embedded primary display and has its own phy >>>>>>>> + * initialize phy immediately >>>>>>> Question still stands why we can't wait for hpd high from the eDP panel. >>>>>>> Also, I think "has its own phy" means that it's not part of a combo >>>>>>> USB+DP phy? Can you please clarify? >> Correct, eDP has its dedicated phy which is not part of combo phy. > Why does that mean we can't wait for hpd high from the eDP panel? Sorry, missed this one. Yes, it can wait for hpd high. Since it always presented, I just think it is better to show display sooner not later until hdp high. you like it to wait until hpd high? >>>>>>>> + */ >>>>>>>> + if (dp->dp_display.connector_type == DRM_MODE_CONNECTOR_eDP) >>>>>>>> + dp_display_host_phy_init(dp); >>>>>>>> >>>>>>>> - dp_power_init(dp->power, flip); >>>>>>>> - dp_ctrl_host_init(dp->ctrl, flip, reset); >>>>>>>> dp_aux_init(dp->aux); >>>>>>>> dp->core_initialized = true; >>>>>>>> } >>>>>>>> @@ -1306,20 +1330,23 @@ static int dp_pm_resume(struct device *dev) >>>>>>>> dp->hpd_state = ST_DISCONNECTED; >>>>>>>> >>>>>>>> /* turn on dp ctrl/phy */ >>>>>>>> - dp_display_host_init(dp, true); >>>>>>>> + dp_display_host_init(dp); >>>>>>>> >>>>>>>> dp_catalog_ctrl_hpd_config(dp->catalog); >>>>>>>> >>>>>>>> - /* >>>>>>>> - * set sink to normal operation mode -- D0 >>>>>>>> - * before dpcd read >>>>>>>> - */ >>>>>>>> - dp_link_psm_config(dp->link, &dp->panel->link_info, false); >>>>>>>> >>>>>>>> if (dp_catalog_link_is_connected(dp->catalog)) { >>>>>>>> + /* >>>>>>>> + * set sink to normal operation mode -- D0 >>>>>>>> + * before dpcd read >>>>>>>> + */ >>>>>>>> + dp_display_host_phy_init(dp); >>>>>>>> + dp_link_psm_config(dp->link, &dp->panel->link_info, false); >>>>>>>> sink_count = drm_dp_read_sink_count(dp->aux); >>>>>>>> if (sink_count < 0) >>>>>>>> sink_count = 0; >>>>>>>> + >>>>>>>> + dp_display_host_phy_exit(dp); >>>>>>> Why is the phy exited on resume when the link is still connected? Is >>>>>>> this supposed to be done only when the sink_count is 0? And how does >>>>>>> this interact with eDP where the phy is initialized by the call to >>>>>>> dp_display_host_init() earlier in this function. >> At beginning of dp_pm_resume bot core_initialized and phy_initialized >> should be off. >> >> However at the case of dongle still connected to DUT, we have to read >> dongle dpcd to decided any hdmi connect to dongle (sink_count != 0). in >> this case, we have to turn on phy to perform dpcd read and turn off phy >> after read so the following plugged-in interrupt can be handled correctly. >> > That looks like a lot of wasted work. Why can't we turn on the core, > turn on the phy, check if it's connected, and then turn off the phy if > it isn't? At the least, please put a comment above this phy_exit() call > indicating that we'll turn the phy back on while processing a plugged in > interrupt.
WARNING: multiple messages have this Message-ID (diff)
From: Kuogee Hsieh <quic_khsieh@quicinc.com> To: Stephen Boyd <swboyd@chromium.org>, <agross@kernel.org>, <airlied@linux.ie>, <bjorn.andersson@linaro.org>, <daniel@ffwll.ch>, <dmitry.baryshkov@linaro.org>, <dri-devel@lists.freedesktop.org>, <robdclark@gmail.com>, <sean@poorly.run>, <vkoul@kernel.org> Cc: quic_sbillaka@quicinc.com, linux-arm-msm@vger.kernel.org, quic_abhinavk@quicinc.com, linux-kernel@vger.kernel.org, aravindh@codeaurora.org, freedreno@lists.freedesktop.org Subject: Re: [PATCH v11 1/4] drm/msm/dp: do not initialize phy until plugin interrupt received Date: Thu, 13 Jan 2022 14:14:27 -0800 [thread overview] Message-ID: <c190bd82-b6d3-b6a9-3e58-32c8d9d417c1@quicinc.com> (raw) In-Reply-To: <CAE-0n53qxer=shY3LdxzDPFaQb1L65okX9TM0TXYCdD59qau5g@mail.gmail.com> On 1/13/2022 1:52 PM, Stephen Boyd wrote: > Quoting Kuogee Hsieh (2022-01-13 12:44:16) >> On 1/13/2022 11:47 AM, Stephen Boyd wrote: >>> Quoting Kuogee Hsieh (2022-01-13 09:51:42) >>>> On 1/12/2022 8:13 PM, Stephen Boyd wrote: >>>>>>>> - if (dp->usbpd->orientation == ORIENTATION_CC2) >>>>>>>> - flip = true; >>>>>>>> + dp_power_init(dp->power, false); >>>>>>>> + dp_ctrl_reset_irq_ctrl(dp->ctrl, true); >>>>>>>> + >>>>>>>> + /* >>>>>>>> + * eDP is the embedded primary display and has its own phy >>>>>>>> + * initialize phy immediately >>>>>>> Question still stands why we can't wait for hpd high from the eDP panel. >>>>>>> Also, I think "has its own phy" means that it's not part of a combo >>>>>>> USB+DP phy? Can you please clarify? >> Correct, eDP has its dedicated phy which is not part of combo phy. > Why does that mean we can't wait for hpd high from the eDP panel? Sorry, missed this one. Yes, it can wait for hpd high. Since it always presented, I just think it is better to show display sooner not later until hdp high. you like it to wait until hpd high? >>>>>>>> + */ >>>>>>>> + if (dp->dp_display.connector_type == DRM_MODE_CONNECTOR_eDP) >>>>>>>> + dp_display_host_phy_init(dp); >>>>>>>> >>>>>>>> - dp_power_init(dp->power, flip); >>>>>>>> - dp_ctrl_host_init(dp->ctrl, flip, reset); >>>>>>>> dp_aux_init(dp->aux); >>>>>>>> dp->core_initialized = true; >>>>>>>> } >>>>>>>> @@ -1306,20 +1330,23 @@ static int dp_pm_resume(struct device *dev) >>>>>>>> dp->hpd_state = ST_DISCONNECTED; >>>>>>>> >>>>>>>> /* turn on dp ctrl/phy */ >>>>>>>> - dp_display_host_init(dp, true); >>>>>>>> + dp_display_host_init(dp); >>>>>>>> >>>>>>>> dp_catalog_ctrl_hpd_config(dp->catalog); >>>>>>>> >>>>>>>> - /* >>>>>>>> - * set sink to normal operation mode -- D0 >>>>>>>> - * before dpcd read >>>>>>>> - */ >>>>>>>> - dp_link_psm_config(dp->link, &dp->panel->link_info, false); >>>>>>>> >>>>>>>> if (dp_catalog_link_is_connected(dp->catalog)) { >>>>>>>> + /* >>>>>>>> + * set sink to normal operation mode -- D0 >>>>>>>> + * before dpcd read >>>>>>>> + */ >>>>>>>> + dp_display_host_phy_init(dp); >>>>>>>> + dp_link_psm_config(dp->link, &dp->panel->link_info, false); >>>>>>>> sink_count = drm_dp_read_sink_count(dp->aux); >>>>>>>> if (sink_count < 0) >>>>>>>> sink_count = 0; >>>>>>>> + >>>>>>>> + dp_display_host_phy_exit(dp); >>>>>>> Why is the phy exited on resume when the link is still connected? Is >>>>>>> this supposed to be done only when the sink_count is 0? And how does >>>>>>> this interact with eDP where the phy is initialized by the call to >>>>>>> dp_display_host_init() earlier in this function. >> At beginning of dp_pm_resume bot core_initialized and phy_initialized >> should be off. >> >> However at the case of dongle still connected to DUT, we have to read >> dongle dpcd to decided any hdmi connect to dongle (sink_count != 0). in >> this case, we have to turn on phy to perform dpcd read and turn off phy >> after read so the following plugged-in interrupt can be handled correctly. >> > That looks like a lot of wasted work. Why can't we turn on the core, > turn on the phy, check if it's connected, and then turn off the phy if > it isn't? At the least, please put a comment above this phy_exit() call > indicating that we'll turn the phy back on while processing a plugged in > interrupt.
next prev parent reply other threads:[~2022-01-13 22:14 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-11 18:43 [PATCH v11 0/4] group dp driver related patches into one series Kuogee Hsieh 2022-01-11 18:43 ` Kuogee Hsieh 2022-01-11 18:43 ` [PATCH v11 1/4] drm/msm/dp: do not initialize phy until plugin interrupt received Kuogee Hsieh 2022-01-11 18:43 ` Kuogee Hsieh 2022-01-12 20:00 ` Stephen Boyd 2022-01-12 20:00 ` Stephen Boyd 2022-01-12 22:17 ` Kuogee Hsieh 2022-01-12 22:17 ` Kuogee Hsieh 2022-01-13 4:13 ` Stephen Boyd 2022-01-13 4:13 ` Stephen Boyd 2022-01-13 17:51 ` Kuogee Hsieh 2022-01-13 17:51 ` Kuogee Hsieh 2022-01-13 19:47 ` Stephen Boyd 2022-01-13 19:47 ` Stephen Boyd 2022-01-13 20:44 ` Kuogee Hsieh 2022-01-13 20:44 ` Kuogee Hsieh 2022-01-13 21:52 ` Stephen Boyd 2022-01-13 21:52 ` Stephen Boyd 2022-01-13 22:14 ` Kuogee Hsieh [this message] 2022-01-13 22:14 ` Kuogee Hsieh 2022-01-13 23:13 ` Stephen Boyd 2022-01-13 23:13 ` Stephen Boyd 2022-01-11 18:43 ` [PATCH v11 2/4] drm/msm/dp: populate connector of struct dp_panel Kuogee Hsieh 2022-01-11 18:43 ` Kuogee Hsieh 2022-01-11 18:43 ` [PATCH v11 3/4] drm/msm/dp: add support of tps4 (training pattern 4) for HBR3 Kuogee Hsieh 2022-01-11 18:43 ` Kuogee Hsieh 2022-01-11 18:43 ` [PATCH v11 4/4] drm/msm/dp: stop link training after link training 2 failed Kuogee Hsieh 2022-01-11 18:43 ` Kuogee Hsieh
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=c190bd82-b6d3-b6a9-3e58-32c8d9d417c1@quicinc.com \ --to=quic_khsieh@quicinc.com \ --cc=agross@kernel.org \ --cc=airlied@linux.ie \ --cc=aravindh@codeaurora.org \ --cc=bjorn.andersson@linaro.org \ --cc=daniel@ffwll.ch \ --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=quic_abhinavk@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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.