From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Kuogee Hsieh <quic_khsieh@quicinc.com>,
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
Cc: 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 v7 5/7] drm/msm/dp: incorporate pm_runtime framework into DP driver
Date: Thu, 12 Oct 2023 04:04:07 +0300 [thread overview]
Message-ID: <c7e8d791-c8d5-440c-804d-4aa29be40f13@linaro.org> (raw)
In-Reply-To: <1696632910-21942-6-git-send-email-quic_khsieh@quicinc.com>
On 07/10/2023 01:55, Kuogee Hsieh wrote:
> Currently DP driver is executed independent of PM runtime framework.
> This leads msm eDP panel can not being detected by edp_panel driver
> during generic_edp_panel_probe() due to AUX DPCD read failed at
> edp panel driver. Incorporate PM runtime framework into DP driver so
> that host controller's power and clocks are enable/disable through
> PM runtime mechanism. Once PM runtime framework is incorporated into
> DP driver, waking up device from power up path is not necessary. Hence
> remove it.
>
> After incorporating pm_runtime framework into eDP/DP driver,
> dp_pm_suspend() to handle power off both DP phy and controller during
> suspend and dp_pm_resume() to handle power on both DP phy and controller
> during resume are not necessary. Therefore both dp_pm_suspend() and
> dp_pm_resume() are dropped and replace with dp_pm_runtime_suspend() and
> dp_pm_runtime_resume() respectively.
>
> Changes in v7:
> -- add comments to dp_pm_runtime_resume()
> -- add comments to dp_bridge_hpd_enable()
> -- delete dp->hpd_state = ST_DISCONNECTED from dp_bridge_hpd_notify()
>
> Changes in v6:
> -- delete dp_power_client_deinit(dp->power);
> -- remove if (!dp->dp_display.is_edp) condition checkout at plug_handle()
> -- remove if (!dp->dp_display.is_edp) condition checkout at unplug_handle()
> -- add IRQF_NO_AUTOEN to devm_request_irq()
> -- add enable_irq() and disable_irq() to pm_runtime_resume()/suspend()
> -- del dp->hpd_state = ST_DISCONNECTED from dp_bridge_hpd_disable()
>
> Changes in v5:
> -- remove pm_runtime_put_autosuspend feature, use pm_runtime_put_sync()
> -- squash add pm_runtime_force_suspend()/resume() patch into this patch
>
> Changes in v4:
> -- reworded commit text to explain why pm_framework is required for
> edp panel
> -- reworded commit text to explain autosuspend is choiced
> -- delete EV_POWER_PM_GET and PM_EV_POWER_PUT from changes #3
> -- delete dp_display_pm_get() and dp_display_pm_Put() from changes #3
> -- return value from pm_runtime_resume_and_get() directly
> -- check return value of devm_pm_runtime_enable()
> -- delete pm_runtime_xxx from dp_display_remove()
> -- drop dp_display_host_init() from EV_HPD_INIT_SETUP
> -- drop both dp_pm_prepare() and dp_pm_compete() from this change
> -- delete ST_SUSPENDED state
> -- rewording commit text to add more details regrading the purpose
> of this change
>
> Changes in v3:
> -- incorporate removing pm_runtime_xx() from dp_pwer.c to this patch
> -- use pm_runtime_resume_and_get() instead of pm_runtime_get()
> -- error checking pm_runtime_resume_and_get() return value
> -- add EV_POWER_PM_GET and PM_EV_POWER_PUT to handle HPD_GPIO case
> -- replace dp_pm_suspend() with pm_runtime_force_suspend()
> -- replace dp_pm_resume() with pm_runtime_force_resume()
>
> Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
> ---
> drivers/gpu/drm/msm/dp/dp_aux.c | 5 +
> drivers/gpu/drm/msm/dp/dp_display.c | 177 ++++++++++++++----------------------
> drivers/gpu/drm/msm/dp/dp_power.c | 16 ----
> drivers/gpu/drm/msm/dp/dp_power.h | 11 ---
> 4 files changed, 72 insertions(+), 137 deletions(-)
[skipped the rest]
> @@ -173,11 +162,7 @@ int dp_power_init(struct dp_power *dp_power)
>
> power = container_of(dp_power, struct dp_power_private, dp_power);
>
> - pm_runtime_get_sync(power->dev);
> -
> rc = dp_power_clk_enable(dp_power, DP_CORE_PM, true);
> - if (rc)
> - pm_runtime_put_sync(power->dev);
>
> return rc;
Also this can not be as simple as:
int dp_power_init(struct dp_power *dp_power)
{
return dp_power_clk_enable(dp_power, DP_CORE_PM, true);
}
> }--
With best wishes
Dmitry
next prev parent reply other threads:[~2023-10-12 1:04 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-06 22:55 [PATCH v7 0/7] incorporate pm runtime framework and eDP clean up Kuogee Hsieh
2023-10-06 22:55 ` [PATCH v7 1/7] drm/msm/dp: tie dp_display_irq_handler() with dp driver Kuogee Hsieh
2023-10-06 22:55 ` [PATCH v7 2/7] drm/msm/dp: rename is_connected with link_ready Kuogee Hsieh
2023-10-06 22:55 ` [PATCH v7 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes Kuogee Hsieh
2023-10-06 22:55 ` [PATCH v7 4/7] drm/msm/dp: move parser->parse() and dp_power_client_init() to probe Kuogee Hsieh
2023-10-07 11:34 ` Dmitry Baryshkov
2023-10-06 22:55 ` [PATCH v7 5/7] drm/msm/dp: incorporate pm_runtime framework into DP driver Kuogee Hsieh
2023-10-07 11:34 ` Dmitry Baryshkov
2023-10-12 1:02 ` Dmitry Baryshkov
2023-10-12 1:04 ` Dmitry Baryshkov [this message]
2023-10-06 22:55 ` [PATCH v7 6/7] drm/msm/dp: delete EV_HPD_INIT_SETUP Kuogee Hsieh
2023-10-06 22:55 ` [PATCH v7 7/7] drm/msm/dp: move of_dp_aux_populate_bus() to eDP probe() Kuogee Hsieh
2023-10-10 19:19 ` [PATCH v7 0/7] incorporate pm runtime framework and eDP clean up Stephen Boyd
2023-11-06 0:51 ` [Freedreno] " Leonard Lausen
2023-11-07 1:55 ` Dmitry Baryshkov
2023-11-07 21:00 ` Kuogee Hsieh
2023-11-07 21:23 ` Dmitry Baryshkov
2023-11-08 18:10 ` Kuogee Hsieh
2023-11-08 18:27 ` Abhinav Kumar
2023-11-09 17:51 ` Kuogee Hsieh
2023-11-09 20:35 ` 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=c7e8d791-c8d5-440c-804d-4aa29be40f13@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=agross@kernel.org \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dianders@chromium.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_khsieh@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®