linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Stephen Boyd <swboyd@chromium.org>
Cc: Kuogee Hsieh <khsieh@codeaurora.org>,
	agross@kernel.org, bjorn.andersson@linaro.org,
	robdclark@gmail.com, sean@poorly.run, abhinavk@codeaurora.org,
	aravindh@codeaurora.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/msm/dp: handle irq_hpd with sink_count = 0 correctly
Date: Wed, 12 May 2021 10:57:26 +0530	[thread overview]
Message-ID: <YJtnPt63yK4zP3O1@vkoul-mobl.Dlink> (raw)
In-Reply-To: <CAE-0n50HUo0tm22xX+j8H-u+EDH+wBrdEvM68p-X3EyR8S_u3Q@mail.gmail.com>

On 10-05-21, 11:15, Stephen Boyd wrote:
> Quoting Kuogee Hsieh (2021-05-05 14:52:01)
> > @@ -1414,6 +1416,10 @@ void dp_ctrl_host_deinit(struct dp_ctrl *dp_ctrl)
> >         phy = dp_io->phy;
> >
> >         dp_catalog_ctrl_enable_irq(ctrl->catalog, false);
> > +
> > +       if (phy->power_count)
> > +               phy_power_off(phy);
> > +
> >         phy_exit(phy);
> >
> >         DRM_DEBUG_DP("Host deinitialized successfully\n");
> > @@ -1445,7 +1451,6 @@ static int dp_ctrl_reinitialize_mainlink(struct dp_ctrl_private *ctrl)
> >
> >         dp_catalog_ctrl_mainlink_ctrl(ctrl->catalog, false);
> >         opts_dp->lanes = ctrl->link->link_params.num_lanes;
> > -       phy_configure(phy, &dp_io->phy_opts);
> >         /*
> >          * Disable and re-enable the mainlink clock since the
> >          * link clock might have been adjusted as part of the
> > @@ -1456,9 +1461,13 @@ static int dp_ctrl_reinitialize_mainlink(struct dp_ctrl_private *ctrl)
> >                 DRM_ERROR("Failed to disable clocks. ret=%d\n", ret);
> >                 return ret;
> >         }
> > -       phy_power_off(phy);
> > -       /* hw recommended delay before re-enabling clocks */
> > -       msleep(20);
> > +
> > +       if (phy->power_count) {
> 
> I don't believe members of 'phy' are supposed to be looked at by various
> phy consumer drivers. Vinod, is that right?

That is correct, we should not be doing that. And IMO this code is
redundant, the phy core will check power_count and invoke drivers
.power_off accordingly, so should be removed...

Thanks
-- 
~Vinod

  reply	other threads:[~2021-05-12  5:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 21:52 Kuogee Hsieh
2021-05-10 18:15 ` Stephen Boyd
2021-05-12  5:27   ` Vinod Koul [this message]
2021-05-12 17:30     ` khsieh

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=YJtnPt63yK4zP3O1@vkoul-mobl.Dlink \
    --to=vkoul@kernel.org \
    --cc=abhinavk@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=aravindh@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=khsieh@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@gmail.com \
    --cc=sean@poorly.run \
    --cc=swboyd@chromium.org \
    --subject='Re: [PATCH] drm/msm/dp: handle irq_hpd with sink_count = 0 correctly' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).