disp: msm: sde: fix trusted-ui transition checks

Avoid crtc_state active_changed flag and explicitly check new/old
crtc_state active to decide if trusted vm transition checks are
required. As the active_changed might not be set at this point
in atomic_check sequence.

Change-Id: I142befad68359ae5ee862a1306bdc75531d63e70
Signed-off-by: Veera Sundaram Sankaran <veeras@codeaurora.org>
This commit is contained in:
Veera Sundaram Sankaran
2020-10-12 13:52:18 -07:00
parent eb3d20eb39
commit 689f5eb836

View File

@@ -2525,33 +2525,29 @@ static int sde_kms_check_vm_request(struct msm_kms *kms,
for_each_oldnew_crtc_in_state(state, crtc, old_cstate, new_cstate, i) { for_each_oldnew_crtc_in_state(state, crtc, old_cstate, new_cstate, i) {
struct sde_crtc_state *old_state = NULL, *new_state = NULL; struct sde_crtc_state *old_state = NULL, *new_state = NULL;
new_state = to_sde_crtc_state(new_cstate); if (!new_cstate->active && !old_cstate->active)
if (!new_cstate->active && !new_cstate->active_changed)
continue; continue;
new_state = to_sde_crtc_state(new_cstate);
new_vm_req = sde_crtc_get_property(new_state, new_vm_req = sde_crtc_get_property(new_state,
CRTC_PROP_VM_REQ_STATE); CRTC_PROP_VM_REQ_STATE);
commit_crtc_cnt++; old_state = to_sde_crtc_state(old_cstate);
old_vm_req = sde_crtc_get_property(old_state,
if (old_cstate) { CRTC_PROP_VM_REQ_STATE);
old_state = to_sde_crtc_state(old_cstate);
old_vm_req = sde_crtc_get_property(old_state,
CRTC_PROP_VM_REQ_STATE);
}
/** /**
* No active request if the transition is from * No active request if the transition is from
* VM_REQ_NONE to VM_REQ_NONE * VM_REQ_NONE to VM_REQ_NONE
*/ */
if (new_vm_req || (old_state && old_vm_req)) if (new_vm_req || old_vm_req)
vm_req_active = true; vm_req_active = true;
idle_pc_state = sde_crtc_get_property(new_state, idle_pc_state = sde_crtc_get_property(new_state,
CRTC_PROP_IDLE_PC_STATE); CRTC_PROP_IDLE_PC_STATE);
active_crtc = crtc; active_crtc = crtc;
commit_crtc_cnt++;
} }
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {