Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80cc3b70 authored by Dhaval Patel's avatar Dhaval Patel Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: update secure display validation checks



Non-secure pipe should not be staged on MDSS when
secure display session is in progress. Client has
to unstage all pipes to disable the secure session
before pushing non-secure layers on MDP. This change
updates the validation checks to avoid such conditions.

Change-Id: I626c6c3a5ef313b1af8369884a9b10d8586f7251
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent ac6766f8
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1055,9 +1055,10 @@ static int __validate_secure_display(struct mdss_overlay_private *mdp5_data)
	pr_debug("pipe count:: secure display:%d non-secure:%d\n",
		sd_pipes, nonsd_pipes);

	if (sd_pipes && nonsd_pipes) {
		pr_err("pipe count:: secure display:%d non-secure:%d\n",
			sd_pipes, nonsd_pipes);
	if ((sd_pipes || mdss_get_sd_client_cnt()) && nonsd_pipes) {
		pr_err("non-secure layer validation request during secure display session\n");
		pr_err(" secure client cnt:%d secure pipe cnt:%d non-secure pipe cnt:%d\n",
			mdss_get_sd_client_cnt(), sd_pipes, nonsd_pipes);
		return -EINVAL;
	} else {
		return 0;