disp: msm: sde: add kickoff_in_progress flag in sde crtc

In dual display usecases, during pm suspend/resume,
commit is scheduled only on primary crtc thread. If idle
timeout value is very short such as in LP2 mode, it might
result in race condition due to idle pc off work getting
scheduled on its crtc thread. This change adds kickoff in
progress flag to handle such cases as crtc frame pending
count is only updated after rc kickoff.

Change-Id: Iebb331d914b23cc5eeadfeb2a488891e88b3202a
Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
This commit is contained in:
Yashwanth
2021-01-13 19:07:50 +05:30
committad av Nilaan Gunabalachandran
förälder 4f8792dfc6
incheckning 75f3403326
3 ändrade filer med 7 tillägg och 1 borttagningar

Visa fil

@@ -3998,6 +3998,7 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
idle_pc_state = sde_crtc_get_property(cstate, CRTC_PROP_IDLE_PC_STATE);
sde_crtc->kickoff_in_progress = true;
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
if (encoder->crtc != crtc)
continue;
@@ -4059,6 +4060,7 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
sde_encoder_kickoff(encoder, false, true);
}
sde_crtc->kickoff_in_progress = false;
/* store the event after frame trigger */
if (sde_crtc->event) {
@@ -7092,6 +7094,7 @@ struct drm_crtc *sde_crtc_init(struct drm_device *dev, struct drm_plane *plane)
atomic_set(&sde_crtc->frame_pending, 0);
sde_crtc->enabled = false;
sde_crtc->kickoff_in_progress = false;
/* Below parameters are for fps calculation for sysfs node */
sde_crtc->fps_info.fps_periodic_duration = DEFAULT_FPS_PERIOD_1_SEC;