summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorAbhijit Kulkarni <kabhijit@codeaurora.org>2017-01-11 19:44:34 -0800
committerAbhijit Kulkarni <kabhijit@codeaurora.org>2017-01-12 18:28:20 -0800
commit66c98918d1938d36f66d70732ff04e6dab0553f7 (patch)
treee5df204bf983bd629f521dd95322910f4ffc8f51 /drivers/video/fbdev
parent2dc96b1cbbdcf5aef3780696708012d55fec57f2 (diff)
msm: mdss: fix secure session validation
During secure to non secure transition the commit contains only non-secure layers and there is no null commit in between. This change correctly validates such commit and allows non secure layers only and the driver then performs the functionality to transition to non-secure state. CRs-Fixed: 1110585 Change-Id: Ic1d32f0d04d8ee860844f59fd99707dbdb78838f Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_layer.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_layer.c b/drivers/video/fbdev/msm/mdss_mdp_layer.c
index c53c8d293539..7b4a57f3b221 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_layer.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_layer.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -1684,7 +1684,12 @@ 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);
- if ((sd_pipes || mdss_get_sd_client_cnt()) &&
+ 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) &&
(nonsd_pipes || secure_vid_pipes ||
secure_cam_pipes)) {
pr_err("non-secure layer validation request during secure display session\n");