summaryrefslogtreecommitdiff
path: root/samsung/exynos_drm_fb.c
diff options
context:
space:
mode:
authorAdrian Salido <salidoa@google.com>2021-03-18 20:32:25 -0700
committerAdrian Salido <salidoa@google.com>2021-05-04 05:06:52 +0000
commitaec15457bfa0d751affc87800df05eb3b97a88d4 (patch)
treedeb4b5c6fedd7cca5024daabe0d8dcdf5a3344fb /samsung/exynos_drm_fb.c
parentafc77fe40366078721fda1f6b92289c90705c96b (diff)
downloaddisplay-aec15457bfa0d751affc87800df05eb3b97a88d4.tar.gz
drm: samsung: refactor hibernation into self refresh mode
Replace hibernation global functions and implement using drm core provided self refresh state. The self refresh state can be propagated to all components in the display pipeline including connectors/bridges. Bug: 180539030 Signed-off-by: Adrian Salido <salidoa@google.com> Change-Id: Ia533b08be9402793539d2ddaa650a6daa09da22c
Diffstat (limited to 'samsung/exynos_drm_fb.c')
-rw-r--r--samsung/exynos_drm_fb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/samsung/exynos_drm_fb.c b/samsung/exynos_drm_fb.c
index 23c1d59..13e1c40 100644
--- a/samsung/exynos_drm_fb.c
+++ b/samsung/exynos_drm_fb.c
@@ -486,19 +486,19 @@ static void exynos_atomic_commit_tail(struct drm_atomic_state *old_state)
DPU_EVENT_LOG(DPU_EVT_REQ_CRTC_INFO_NEW, decon->id,
new_crtc_state);
- if (new_crtc_state->active || new_crtc_state->active_changed) {
- const bool was_hibernating = hibernation_block_exit(decon->hibernation);
+ if (new_crtc_state->active || old_crtc_state->active) {
+ hibernation_block(decon->hibernation);
hibernation_crtc_mask |= drm_crtc_mask(crtc);
- if (was_hibernating)
- WARN_ON(drm_atomic_add_affected_planes(old_state, crtc));
}
- if (old_crtc_state->active && drm_atomic_crtc_needs_modeset(new_crtc_state)) {
+ 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");
funcs = crtc->helper_private;