msm: mdss: free ion memory after panel is blanked

Frame buffer memory could still be fetched until panel is completely
blanked, in order to avoid potential page faults by unmapping early,
move unmapping of this memory until after panel is blanked.

CRs-Fixed: 763046
Change-Id: Ib7eea73a7549b453cf2fc31a31f5cc3e9e1cce39
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
This commit is contained in:
Adrian Salido-Moreno 2014-11-26 09:49:01 -08:00 committed by Gerrit - the friendly Code Review server
parent ba6ee8cfbe
commit 1f968069a6

View file

@ -2277,9 +2277,6 @@ static int mdss_fb_release_all(struct fb_info *info, bool release_all)
if (mfd->mdp.release_fnc)
mfd->mdp.release_fnc(mfd, true, pid);
if (mfd->fb_ion_handle)
mdss_fb_free_fb_ion_memory(mfd);
ret = mdss_fb_blank_sub(FB_BLANK_POWERDOWN, info,
mfd->op_enable);
if (ret) {
@ -2287,6 +2284,9 @@ static int mdss_fb_release_all(struct fb_info *info, bool release_all)
mfd->index, ret, task->comm, current->tgid, pid);
return ret;
}
if (mfd->fb_ion_handle)
mdss_fb_free_fb_ion_memory(mfd);
atomic_set(&mfd->ioctl_ref_cnt, 0);
} else if (release_needed) {
pr_debug("current process=%s pid=%d known pid=%d mfd->ref=%d\n",