Re: [PATCH v1 1/5] drm/msm/dp: remove pm_runtime_xxx() from dp_power.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 7/8/2023 7:34 PM, Bjorn Andersson wrote:
On Fri, Jul 07, 2023 at 04:52:19PM -0700, Kuogee Hsieh wrote:
Since both pm_runtime_resume() and pm_runtime_suspend() are not
populated at dp_pm_ops. Those pm_runtime_get/put() functions within
dp_power.c will not have any effects in addition to increase/decrease
power counter. Also pm_runtime_xxx() should be executed at top
layer.


Getting/putting the runtime PM state affects the vote for the GDSC. So I
would suggest that you move this after patch 2, to not create a gap in
the git history of lacking GDSC votes.

Regards,
Bjorn


the mdss_dp node has rpmhpd SC7180_CX in its power domains. the parent device has the GDSC.

So just so that I understand this right, the DP's vote on this will still count because the parent's power domain wont get collapsed till the child PM votes are removed too?

If so, I see your point and yes it will make sense to move this later to avoid the gap.

Signed-off-by: Kuogee Hsieh <quic_khsieh@xxxxxxxxxxx>
---
  drivers/gpu/drm/msm/dp/dp_power.c | 9 ---------
  1 file changed, 9 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_power.c b/drivers/gpu/drm/msm/dp/dp_power.c
index 5cb84ca..ed2f62a 100644
--- a/drivers/gpu/drm/msm/dp/dp_power.c
+++ b/drivers/gpu/drm/msm/dp/dp_power.c
@@ -152,8 +152,6 @@ int dp_power_client_init(struct dp_power *dp_power)
power = container_of(dp_power, struct dp_power_private, dp_power); - pm_runtime_enable(power->dev);
-
  	return dp_power_clk_init(power);
  }
@@ -162,8 +160,6 @@ void dp_power_client_deinit(struct dp_power *dp_power)
  	struct dp_power_private *power;
power = container_of(dp_power, struct dp_power_private, dp_power);
-
-	pm_runtime_disable(power->dev);
  }
int dp_power_init(struct dp_power *dp_power)
@@ -173,11 +169,7 @@ int dp_power_init(struct dp_power *dp_power)
power = container_of(dp_power, struct dp_power_private, dp_power); - pm_runtime_get_sync(power->dev);
-
  	rc = dp_power_clk_enable(dp_power, DP_CORE_PM, true);
-	if (rc)
-		pm_runtime_put_sync(power->dev);
return rc;
  }
@@ -189,7 +181,6 @@ int dp_power_deinit(struct dp_power *dp_power)
  	power = container_of(dp_power, struct dp_power_private, dp_power);
dp_power_clk_enable(dp_power, DP_CORE_PM, false);
-	pm_runtime_put_sync(power->dev);
  	return 0;
  }
--
2.7.4




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux