[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAE-0n52UntroUk9hzPorUOvkVty1=V5B2oznYghi_DM6=zyzrw@mail.gmail.com>
Date: Fri, 14 Jan 2022 14:41:48 -0600
From: Stephen Boyd <swboyd@...omium.org>
To: Kuogee Hsieh <quic_khsieh@...cinc.com>, agross@...nel.org,
airlied@...ux.ie, bjorn.andersson@...aro.org, daniel@...ll.ch,
dmitry.baryshkov@...aro.org, dri-devel@...ts.freedesktop.org,
robdclark@...il.com, sean@...rly.run, vkoul@...nel.org
Cc: quic_abhinavk@...cinc.com, aravindh@...eaurora.org,
quic_sbillaka@...cinc.com, freedreno@...ts.freedesktop.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v14 1/4] drm/msm/dp: do not initialize phy until plugin
interrupt received
Quoting Kuogee Hsieh (2022-01-14 09:54:31)
> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
> index 7cc4d21..2616f7b 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
> @@ -372,21 +373,38 @@ static int dp_display_process_hpd_high(struct dp_display_private *dp)
> return rc;
> }
>
> -static void dp_display_host_init(struct dp_display_private *dp, int reset)
> +static void dp_display_host_phy_init(struct dp_display_private *dp)
> {
> - bool flip = false;
> + DRM_DEBUG_DP("core_init=%d phy_init=%d\n",
> + dp->core_initialized, dp->phy_initialized);
>
> + if (!dp->phy_initialized) {
> + dp_ctrl_phy_init(dp->ctrl);
> + dp->phy_initialized = true;
> + }
> +}
> +
> +static void dp_display_host_phy_exit(struct dp_display_private *dp)
> +{
> + DRM_DEBUG_DP("core_init=%d phy_init=%d\n",
> + dp->core_initialized, dp->phy_initialized);
> +
> + if (dp->phy_initialized) {
> + dp_ctrl_phy_exit(dp->ctrl);
> + dp->phy_initialized = false;
> + }
> +}
> +
> +static void dp_display_host_init(struct dp_display_private *dp)
> +{
> DRM_DEBUG_DP("core_initialized=%d\n", dp->core_initialized);
> if (dp->core_initialized) {
Can you remove this if condition too? I don't see how it ever happens.
> DRM_DEBUG_DP("DP core already initialized\n");
> return;
> }
>
> - if (dp->usbpd->orientation == ORIENTATION_CC2)
> - flip = true;
> -
> - dp_power_init(dp->power, flip);
> - dp_ctrl_host_init(dp->ctrl, flip, reset);
> + dp_power_init(dp->power, false);
> + dp_ctrl_reset_irq_ctrl(dp->ctrl, true);
> dp_aux_init(dp->aux);
> dp->core_initialized = true;
> }
Powered by blists - more mailing lists