disp: msm: sde: add pending ctl recovery mask in sde_kms
This change adds pending ctl recovery mask in sde kms structure to check if there are any ctl paths pending for recovery and stages only border fill during such conditions to avoid device crash. Below is the issue sequence observed during the crash: 1) On one of the ctl path, flush didn't take effect and flush bits are still pending. 2) It was a NULL flush and last good flush on that interface has DMA2 pipe staged along with other pipes. 3) Different ctl path re-uses the DMA2 pipe (attached to ctl path in #1) causing wr_ptr timeout followed by ppdone timeout. Change-Id: I07eb9f2fe41f59963dc27655c551c05abe240392 Signed-off-by: Yashwanth <yvulapu@codeaurora.org>
This commit is contained in:

committed by
Nilaan Gunabalachandran

parent
1961183b41
commit
e96e5bd074
@@ -3892,8 +3892,11 @@ int sde_crtc_reset_hw(struct drm_crtc *crtc, struct drm_crtc_state *old_state,
|
||||
}
|
||||
|
||||
/* Early out if simple ctl reset succeeded */
|
||||
if (i == sde_crtc->num_ctls)
|
||||
if (i == sde_crtc->num_ctls) {
|
||||
sde_kms_update_recovery_mask(_sde_crtc_get_kms(crtc),
|
||||
crtc, false);
|
||||
return 0;
|
||||
}
|
||||
|
||||
SDE_DEBUG("crtc%d: issuing hard reset\n", DRMID(crtc));
|
||||
|
||||
@@ -3951,6 +3954,8 @@ int sde_crtc_reset_hw(struct drm_crtc *crtc, struct drm_crtc_state *old_state,
|
||||
sde_encoder_kickoff(encoder, false, true);
|
||||
}
|
||||
|
||||
sde_kms_update_recovery_mask(_sde_crtc_get_kms(crtc),
|
||||
crtc, false);
|
||||
/* panic the device if VBIF is not in good state */
|
||||
return !recovery_events ? 0 : -EAGAIN;
|
||||
}
|
||||
@@ -4025,6 +4030,8 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
|
||||
params.recovery_events_enabled))
|
||||
is_error = true;
|
||||
sde_crtc->needs_hw_reset = false;
|
||||
} else {
|
||||
sde_kms_update_recovery_mask(sde_kms, crtc, false);
|
||||
}
|
||||
|
||||
sde_crtc_calc_fps(sde_crtc);
|
||||
@@ -4045,9 +4052,10 @@ void sde_crtc_commit_kickoff(struct drm_crtc *crtc,
|
||||
|
||||
sde_vbif_clear_errors(sde_kms);
|
||||
|
||||
if (is_error) {
|
||||
if (is_error || sde_kms->recovery_mask) {
|
||||
_sde_crtc_remove_pipe_flush(crtc);
|
||||
_sde_crtc_blend_setup(crtc, old_state, false);
|
||||
SDE_EVT32(sde_kms->recovery_mask);
|
||||
}
|
||||
|
||||
list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
|
||||
|
Reference in New Issue
Block a user