summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrishna Chaitanya Devarakonda <kdevarak@codeaurora.org>2017-05-24 19:40:39 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2017-05-31 23:31:52 -0700
commit183f6944db172aa6a3a66093e137c6e333c4aaf6 (patch)
tree53007a575f9c3fa6e717f1100a52c71fbf79a8e8
parenta5706c4fdac1a427fac7b30a49912a1d9d148cb9 (diff)
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: Krishna Chaitanya Devarakonda <kdevarak@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_layer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_layer.c b/drivers/video/fbdev/msm/mdss_mdp_layer.c
index 472f1e8e8e3b..8da88a8dfe3f 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_layer.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_layer.c
@@ -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");