disp: msm: sde: revert to previous smmu state upon failure to switch

This change saves the previous state before moving into the transitional
smmu state, during secure-display/secure-camera usecases. Upon failure
to complete the transition, set smmu state to the previous state.
Previously, smmu state was staying in transitional state.

Change-Id: I1a78ddcf6ac1c7ea66c8c2095cd1a6d6160647a1
Signed-off-by: Samantha Tran <samtran@codeaurora.org>
This commit is contained in:
Samantha Tran
2019-08-30 17:05:56 -07:00
parent 685240ed01
commit ad97f0cf4d
3 changed files with 21 additions and 5 deletions

View File

@@ -1781,6 +1781,8 @@ int sde_crtc_get_secure_transition_ops(struct drm_crtc *crtc,
return -EINVAL;
smmu_state = &sde_kms->smmu_state;
smmu_state->prev_state = smmu_state->state;
sde_crtc = to_sde_crtc(crtc);
secure_level = sde_crtc_get_secure_level(crtc, crtc->state);
catalog = sde_kms->catalog;