msm: mdss: avoid rotator request during secure display session

Secure display works with default orientation. Fail
rotator request during secure session to avoid non-secure
or invalid buffer fetching from rotator smmu.

Change-Id: If99481c8a31a466166edb2b393fef19bc2a983b9
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
This commit is contained in:
Dhaval Patel 2015-11-11 10:46:53 -08:00 committed by David Keitel
parent 71a3bc7811
commit ca143687bb

View file

@ -2130,6 +2130,11 @@ static int mdss_rotator_handle_request(struct mdss_rot_mgr *mgr,
struct mdss_rot_entry_container *req = NULL;
int size, ret;
if (mdss_get_sd_client_cnt()) {
pr_err("rot request not permitted during secure display session\n");
return -EPERM;
}
ret = copy_from_user(&user_req, (void __user *)arg,
sizeof(user_req));
if (ret) {
@ -2282,6 +2287,11 @@ static int mdss_rotator_handle_request32(struct mdss_rot_mgr *mgr,
struct mdss_rot_entry_container *req = NULL;
int size, ret;
if (mdss_get_sd_client_cnt()) {
pr_err("rot request not permitted during secure display session\n");
return -EPERM;
}
ret = copy_from_user(&user_req32, (void __user *)arg,
sizeof(user_req32));
if (ret) {