summaryrefslogtreecommitdiff
path: root/samsung/exynos_drm_fb.c
diff options
context:
space:
mode:
authorShiyong Li <shiyongli@google.com>2021-10-24 06:26:24 +0000
committerShiyong Li <shiyongli@google.com>2021-10-27 19:46:38 +0000
commitbd35cd551dc16c44eb30e4ac08799d9c214476af (patch)
treeb54597aa21e7131954446ce5ae3bbe056f1a9eff /samsung/exynos_drm_fb.c
parent418eb9ccd56230cbeaa88be1804dca56f6109b0e (diff)
downloaddisplay-bd35cd551dc16c44eb30e4ac08799d9c214476af.tar.gz
drm: samsung: keep power up and wait enough time at disabling decon
To ensure crtc disabling process is not interfered by pm powerdown tries, hold runtime pm vote before disabling crtc/decon. Use the lower fps based on best knowledge at calculating timeout of waiting for decon stopping. Bug: 201610792 Signed-off-by: Shiyong Li <shiyongli@google.com> Change-Id: I55e679fc3802c6bfb388dc20e8759058babf68bc
Diffstat (limited to 'samsung/exynos_drm_fb.c')
-rw-r--r--samsung/exynos_drm_fb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/samsung/exynos_drm_fb.c b/samsung/exynos_drm_fb.c
index d270a54..8f47fee 100644
--- a/samsung/exynos_drm_fb.c
+++ b/samsung/exynos_drm_fb.c
@@ -464,6 +464,7 @@ static void exynos_atomic_commit_tail(struct drm_atomic_state *old_state)
struct drm_connector_state *old_conn_state;
struct drm_connector_state *new_conn_state;
unsigned int hibernation_crtc_mask = 0;
+ unsigned int disabling_crtc_mask = 0;
DPU_ATRACE_BEGIN("exynos_atomic_commit_tail");
@@ -498,6 +499,12 @@ static void exynos_atomic_commit_tail(struct drm_atomic_state *old_state)
hibernation_crtc_mask |= drm_crtc_mask(crtc);
}
+ if (drm_atomic_crtc_effectively_active(old_crtc_state) && !new_crtc_state->active) {
+ /* keep runtime vote while disabling is taking place */
+ pm_runtime_get_sync(decon->dev);
+ disabling_crtc_mask |= drm_crtc_mask(crtc);
+ }
+
if (old_crtc_state->active && drm_atomic_crtc_needs_modeset(new_crtc_state)) {
DPU_ATRACE_BEGIN("crtc_disable");
@@ -572,6 +579,8 @@ static void exynos_atomic_commit_tail(struct drm_atomic_state *old_state)
decon = crtc_to_decon(crtc);
if (hibernation_crtc_mask & drm_crtc_mask(crtc))
hibernation_unblock_enter(decon->hibernation);
+ if (disabling_crtc_mask & drm_crtc_mask(crtc))
+ pm_runtime_put_sync(decon->dev);
}
drm_atomic_helper_commit_hw_done(old_state);