[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <868dbca9a30e0d6a6d51f5e559b12ea3@codeaurora.org>
Date: Wed, 12 May 2021 10:30:39 -0700
From: khsieh@...eaurora.org
To: Vinod Koul <vkoul@...nel.org>
Cc: Stephen Boyd <swboyd@...omium.org>, agross@...nel.org,
bjorn.andersson@...aro.org, robdclark@...il.com, sean@...rly.run,
abhinavk@...eaurora.org, aravindh@...eaurora.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/msm/dp: handle irq_hpd with sink_count = 0 correctly
On 2021-05-11 22:27, Vinod Koul wrote:
> 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
ok, v2 patch uploaded to address this issue.
Powered by blists - more mailing lists