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

Commit 183f6944 authored by Krishna Chaitanya Devarakonda's avatar Krishna Chaitanya Devarakonda Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: Check if secure display is enabled during non-secure validate



For video mode panels, when secure display has ended and non-secure
layers are being committed, check if secure display is still enabled.
Ideally there should be a NULL commit before non-secure content starts,
to clean up the secure display. If this isn't the case, add code to
detect, validate, and return failure.

Change-Id: I574547307073e38a19a42ff21679b17e1ec29b3b
Signed-off-by: default avatarKrishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
parent a5706c4f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1812,13 +1812,16 @@ static int __validate_secure_session(struct mdss_overlay_private *mdp5_data)

	pr_debug("pipe count:: secure display:%d non-secure:%d secure-vid:%d,secure-cam:%d\n",
		sd_pipes, nonsd_pipes, secure_vid_pipes, secure_cam_pipes);
	MDSS_XLOG(mdss_get_sd_client_cnt(), sd_pipes, nonsd_pipes,
			secure_vid_pipes, secure_cam_pipes);

	if (mdss_get_sd_client_cnt() && !mdp5_data->sd_enabled) {
		pr_err("Secure session already enabled for other client\n");
		return -EINVAL;
	}

	if ((sd_pipes) &&
	if (((sd_pipes) || (mdp5_data->ctl->is_video_mode &&
		mdss_get_sd_client_cnt())) &&
		(nonsd_pipes || secure_vid_pipes ||
		secure_cam_pipes)) {
		pr_err("non-secure layer validation request during secure display session\n");