summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPing Li <quicpingli@codeaurora.org>2013-08-18 18:41:27 -0400
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:20:04 -0700
commit09ac06aa0489eb8768d645d8dbfc0bb25ab3a7fe (patch)
treeac5f09913375e0813c35679c9bfefcfc81e77557
parent63595df4215102e436c3fd3c48b28e575553a6b2 (diff)
msm: mdss: Modify the calibration register address check range
Include address 0x0 to the valid address list for calibration ioctl, so that user space can read the MDP version. Change-Id: I128dbf6d9febf7fcd745b350933502984ab2fe24 Signed-off-by: Ping Li <quicpingli@codeaurora.org>
-rw-r--r--drivers/video/fbdev/msm/mdss_mdp_pp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/fbdev/msm/mdss_mdp_pp.c b/drivers/video/fbdev/msm/mdss_mdp_pp.c
index d7a198411745..962d2301dace 100644
--- a/drivers/video/fbdev/msm/mdss_mdp_pp.c
+++ b/drivers/video/fbdev/msm/mdss_mdp_pp.c
@@ -3365,7 +3365,7 @@ static int is_valid_calib_addr(void *addr)
unsigned int ptr;
ptr = (unsigned int) addr;
/* if request is outside the MDP reg-map or is not aligned 4 */
- if (ptr == 0x0 || ptr > 0x5138 || ptr % 0x4)
+ if (ptr > 0x5138 || ptr % 0x4)
goto end;
if (ptr >= 0x100 && ptr <= 0x5138) {
/* if ptr is in dspp range */
@@ -3420,7 +3420,8 @@ static int is_valid_calib_addr(void *addr)
ret = 1;
else if (ptr == 0x2234 || ptr == 0x1e34 || ptr == 0x2634)
ret = 1;
- }
+ } else if (ptr == 0x0)
+ ret = 1;
end:
return ret;
}