phy: qcom: Program SSC only if supported by sink
authorSankeerth Billakanti <quic_sbillaka@quicinc.com>
Tue, 8 Feb 2022 00:17:04 +0000 (16:17 -0800)
committerVinod Koul <vkoul@kernel.org>
Tue, 8 Feb 2022 05:32:55 +0000 (11:02 +0530)
Some legacy eDP sinks may not support SSC. The support for SSC is
indicated through an opts flag from the controller driver. This
change will enable SSC only if the sink supports it.

Signed-off-by: Sankeerth Billakanti <quic_sbillaka@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20220207161612.REPOST.v1.3.Ie81d594ec2327dae6410db359cc492484bab171f@changeid
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-edp.c

index 21cafbb623f8d411c1b43d4d796de8928af7d1f8..cacd32f6e0cc6d76e3956e478098b3487aaaac08 100644 (file)
@@ -335,9 +335,11 @@ static int qcom_edp_phy_power_on(struct phy *phy)
        writel(0x00, edp->tx0 + TXn_LANE_MODE_1);
        writel(0x00, edp->tx1 + TXn_LANE_MODE_1);
 
-       ret = qcom_edp_configure_ssc(edp);
-       if (ret)
-               return ret;
+       if (edp->dp_opts.ssc) {
+               ret = qcom_edp_configure_ssc(edp);
+               if (ret)
+                       return ret;
+       }
 
        ret = qcom_edp_configure_pll(edp);
        if (ret)