diff --git a/drivers/video/msm/mdp4_overlay.c b/drivers/video/msm/mdp4_overlay.c index 9e5f2a33165c..5c96e37fb320 100644 --- a/drivers/video/msm/mdp4_overlay.c +++ b/drivers/video/msm/mdp4_overlay.c @@ -1,4 +1,5 @@ -/* Copyright (c) 2009-2012, Code Aurora Forum. All rights reserved. +/* + * Copyright (c) 2009-2013, 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 @@ -3347,9 +3348,6 @@ int mdp4_overlay_play(struct fb_info *info, struct msmfb_overlay_data *req) if (mfd == NULL) return -ENODEV; - if (!mfd->panel_power_on) /* suspended */ - return -EPERM; - pipe = mdp4_overlay_ndx2pipe(req->id); if (pipe == NULL) { mdp4_stat.err_play++; diff --git a/drivers/video/msm/msm_fb.c b/drivers/video/msm/msm_fb.c index 4decf2627b85..16c7254c7484 100644 --- a/drivers/video/msm/msm_fb.c +++ b/drivers/video/msm/msm_fb.c @@ -1,4 +1,5 @@ -/* drivers/video/msm/msm_fb.c +/* + * drivers/video/msm/msm_fb.c * * Core MSM framebuffer driver. * @@ -545,10 +546,6 @@ static int msm_fb_suspend_sub(struct msm_fb_data_type *mfd) if ((!mfd) || (mfd->key != MFD_KEY)) return 0; - if (mfd->msmfb_no_update_notify_timer.function) - del_timer(&mfd->msmfb_no_update_notify_timer); - complete(&mfd->msmfb_no_update_notify); - /* * suspend this channel */ @@ -946,6 +943,11 @@ static int msm_fb_blank_sub(int blank_mode, struct fb_info *info, mfd->op_enable = FALSE; curr_pwr_state = mfd->panel_power_on; mfd->panel_power_on = FALSE; + + if (mfd->msmfb_no_update_notify_timer.function) + del_timer(&mfd->msmfb_no_update_notify_timer); + complete(&mfd->msmfb_no_update_notify); + bl_updated = 0; /* clean fb to prevent displaying old fb */ @@ -3169,6 +3171,9 @@ static int msmfb_overlay_play(struct fb_info *info, unsigned long *argp) struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par; struct msm_fb_panel_data *pdata; + if (!mfd->panel_power_on) /* suspended */ + return -EPERM; + if (mfd->overlay_play_enable == 0) /* nothing to do */ return 0;