Commit fc18ea98 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov

drm/msm/dp: inline dp_power_clk_set_rate()

Inline the dp_power_clk_set_rate() function, replacing it with the call
to msm_dss_enable_clk().
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/474719/
Link: https://lore.kernel.org/r/20220217055529.499829-5-dmitry.baryshkov@linaro.orgSigned-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
parent 26345e01
...@@ -151,21 +151,6 @@ static int dp_power_clk_deinit(struct dp_power_private *power) ...@@ -151,21 +151,6 @@ static int dp_power_clk_deinit(struct dp_power_private *power)
return 0; return 0;
} }
static int dp_power_clk_set_rate(struct dp_power_private *power,
enum dp_pm_type module, bool enable)
{
int rc = 0;
struct dss_module_power *mp = &power->parser->mp[module];
rc = msm_dss_enable_clk(mp->clk_config, mp->num_clk, enable);
if (rc) {
DRM_ERROR("failed to %d clks, err: %d\n", enable, rc);
return rc;
}
return 0;
}
int dp_power_clk_status(struct dp_power *dp_power, enum dp_pm_type pm_type) int dp_power_clk_status(struct dp_power *dp_power, enum dp_pm_type pm_type)
{ {
struct dp_power_private *power; struct dp_power_private *power;
...@@ -193,6 +178,7 @@ int dp_power_clk_enable(struct dp_power *dp_power, ...@@ -193,6 +178,7 @@ int dp_power_clk_enable(struct dp_power *dp_power,
{ {
int rc = 0; int rc = 0;
struct dp_power_private *power; struct dp_power_private *power;
struct dss_module_power *mp;
power = container_of(dp_power, struct dp_power_private, dp_power); power = container_of(dp_power, struct dp_power_private, dp_power);
...@@ -225,8 +211,9 @@ int dp_power_clk_enable(struct dp_power *dp_power, ...@@ -225,8 +211,9 @@ int dp_power_clk_enable(struct dp_power *dp_power,
if ((pm_type == DP_CTRL_PM) && (!dp_power->core_clks_on)) { if ((pm_type == DP_CTRL_PM) && (!dp_power->core_clks_on)) {
drm_dbg_dp(power->drm_dev, drm_dbg_dp(power->drm_dev,
"Enable core clks before link clks\n"); "Enable core clks before link clks\n");
mp = &power->parser->mp[DP_CORE_PM];
rc = dp_power_clk_set_rate(power, DP_CORE_PM, enable); rc = msm_dss_enable_clk(mp->clk_config, mp->num_clk, enable);
if (rc) { if (rc) {
DRM_ERROR("fail to enable clks: %s. err=%d\n", DRM_ERROR("fail to enable clks: %s. err=%d\n",
dp_parser_pm_name(DP_CORE_PM), rc); dp_parser_pm_name(DP_CORE_PM), rc);
...@@ -236,7 +223,8 @@ int dp_power_clk_enable(struct dp_power *dp_power, ...@@ -236,7 +223,8 @@ int dp_power_clk_enable(struct dp_power *dp_power,
} }
} }
rc = dp_power_clk_set_rate(power, pm_type, enable); mp = &power->parser->mp[pm_type];
rc = msm_dss_enable_clk(mp->clk_config, mp->num_clk, enable);
if (rc) { if (rc) {
DRM_ERROR("failed to '%s' clks for: %s. err=%d\n", DRM_ERROR("failed to '%s' clks for: %s. err=%d\n",
enable ? "enable" : "disable", enable ? "enable" : "disable",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment