From 4eab59af57ad18e350a245602e0cca50f235afdc Mon Sep 17 00:00:00 2001 From: Kuogee Hsieh Date: Fri, 10 Aug 2012 14:31:37 -0700 Subject: [PATCH] msm_fb: display: fix page fault during supend/resume There has VG1 pipe commit (pan display) happen after system suspended. This left VG1 still staged up at mdp mixer. Once timing generator is enabled at resume, VG1 pipe start fetching contents from address 0 since VG1 has not yet be configured. This cause page fault. This patch has sanity check at system suspend to make sure no any pipe stage up at mixer after suspend. Change-Id: Idcf974ceb4afe2a3ec55b9603b700fa497f84045 Signed-off-by: Kuogee Hsieh Signed-off-by: Siddhartha Agrawal --- drivers/video/msm/mdp4_overlay_dsi_cmd.c | 2 ++ drivers/video/msm/mdp4_overlay_dsi_video.c | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/video/msm/mdp4_overlay_dsi_cmd.c b/drivers/video/msm/mdp4_overlay_dsi_cmd.c index 51f955aa05aa..aa6850efe475 100644 --- a/drivers/video/msm/mdp4_overlay_dsi_cmd.c +++ b/drivers/video/msm/mdp4_overlay_dsi_cmd.c @@ -1210,7 +1210,9 @@ void mdp4_dsi_cmd_overlay(struct msm_fb_data_type *mfd) mdp4_overlay_mdp_perf_upd(mfd, 1); + mutex_lock(&mfd->dma->ov_mutex); mdp4_dsi_cmd_pipe_commit(cndx, 0); + mutex_unlock(&mfd->dma->ov_mutex); mdp4_overlay_mdp_perf_upd(mfd, 0); mutex_unlock(&mfd->dma->ov_mutex); diff --git a/drivers/video/msm/mdp4_overlay_dsi_video.c b/drivers/video/msm/mdp4_overlay_dsi_video.c index 2deef955134b..e7b457ec5f20 100644 --- a/drivers/video/msm/mdp4_overlay_dsi_video.c +++ b/drivers/video/msm/mdp4_overlay_dsi_video.c @@ -1150,6 +1150,7 @@ void mdp4_dsi_video_overlay(struct msm_fb_data_type *mfd) mutex_lock(&mfd->dma->ov_mutex); mdp4_dsi_video_pipe_commit(0, 0); + mutex_unlock(&mfd->dma->ov_mutex); if (pipe->ov_blt_addr) mdp4_dsi_video_wait4ov(0);