drm/rockchip: Suspend DP late
Subsystems (4)
PATCH 1/1 drm/rockchip: Suspend DP late
In commit fe64ba5c6323 ("drm/rockchip: Resume DP early") we moved resume to be early but left suspend at its normal time. This seems like it could be OK, but casues problems if a suspend gets interrupted partway through. The OS only balances matching suspend/resume levels. ...so if suspend was called then resume will be called. If suspend late was called then resume early will be called. ...but if suspend was called resume early might not get called. This leads to an unbalance in the clock enables / disables.
Lets take the simple fix and just move suspend to be late to match. This makes the PM core take proper care in keeping things balanced.
---
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +1 -1
@@ -436,7 +436,7 @@ static int rockchip_dp_resume(struct device *dev)static const struct dev_pm_ops rockchip_dp_pm_ops = { #ifdef CONFIG_PM_SLEEP - .suspend = rockchip_dp_suspend, + .suspend_late = rockchip_dp_suspend, .resume_early = rockchip_dp_resume, #endif };
Signature · 1 line
2.22.0.770.g0f2c4a37fd-goog
Quoted 9 lines · Douglas Anderson
In commit
fe64ba5c6323("drm/rockchip: Resume DP early") we moved resume to be early but left suspend at its normal time. This seems like it could be OK, but casues problems if a suspend gets interrupted partway through. The OS only balances matching suspend/resume levels. ...so if suspend was called then resume will be called. If suspend late was called then resume early will be called. ...but if suspend was called resume early might not get called. This leads to an unbalance in the clock enables / disables.
Quoted 5 lines
Lets take the simple fix and just move suspend to be late to match. This makes the PM core take proper care in keeping things balanced.
Fixes fe64ba5c6323 ("drm/rockchip: Resume DP early")Signed-off-by Douglas Anderson <[email protected]>
This should go in -misc-fixes and due to some... administrative reasons... I will leave it on the list until Maarten has a chance to ff to -rc4 on Monday. I'll apply it then so as to not require a backmerge.
Sean
Quoted 21 lines
---
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +1
-1@@ -436,7 +436,7 @@ static int rockchip_dp_resume(struct device *dev)static const struct dev_pm_ops rockchip_dp_pm_ops = { #ifdef CONFIG_PM_SLEEP - .suspend = rockchip_dp_suspend, + .suspend_late = rockchip_dp_suspend, .resume_early = rockchip_dp_resume, #endif };Signature · 1 line
2.22.0.770.g0f2c4a37fd-goog
Signature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS
Quoted 13 lines · Sean Paul
Quoted 12 lines · Douglas Anderson
In commit
fe64ba5c6323("drm/rockchip: Resume DP early") we moved resume to be early but left suspend at its normal time. This seems like it could be OK, but casues problems if a suspend gets interrupted partway through. The OS only balances matching suspend/resume levels. ...so if suspend was called then resume will be called. If suspend late was called then resume early will be called. ...but if suspend was called resume early might not get called. This leads to an unbalance in the clock enables / disables.Lets take the simple fix and just move suspend to be late to match. This makes the PM core take proper care in keeping things balanced.
Quoted 8 lines
Quoted 2 lines
Fixes fe64ba5c6323 ("drm/rockchip: Resume DP early")Signed-off-by Douglas Anderson <[email protected]>Reviewed-by Sean Paul <[email protected]>This should go in -misc-fixes and due to some... administrative reasons... I will leave it on the list until Maarten has a chance to ff to -rc4 on Monday. I'll apply it then so as to not require a backmerge.
We're no longer able to ff drm-misc-fixes since a commit came in on Saturday, so I've piled this on as well.
Thanks,
Sean
Quoted 27 lines
Sean
Quoted 21 lines
---
drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +1
-1@@ -436,7 +436,7 @@ static int rockchip_dp_resume(struct device *dev)static const struct dev_pm_ops rockchip_dp_pm_ops = { #ifdef CONFIG_PM_SLEEP - .suspend = rockchip_dp_suspend, + .suspend_late = rockchip_dp_suspend, .resume_early = rockchip_dp_resume, #endif };Signature · 1 line
2.22.0.770.g0f2c4a37fd-googSignature · 1 line
Sean Paul, Software Engineer, Google / Chromium OS
Signature · 5 lines
Sean Paul, Software Engineer, Google / Chromium OS _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel