mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm_fb: Handle histogram IRQ cleanly during suspend/resume
Currently, if the histogram disable IOCTL comes after panel is turned off, we early return the IOCTL causing the interrupt to be left enabled. This causes IPC issues during suspend. Fix this issue by properly enabling/disabling the histogram interrupt during suspend/resume scenario. CRs-Fixed: 434491 Change-Id: I4d38776a43ea854aff3c10c8d9d5450af1d98c91 Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
This commit is contained in:
parent
6cf11a614a
commit
cd5918a715
3 changed files with 14 additions and 11 deletions
|
@ -2,7 +2,7 @@
|
|||
*
|
||||
* MSM MDP Interface (used by framebuffer core)
|
||||
*
|
||||
* Copyright (c) 2007-2012, Code Aurora Forum. All rights reserved.
|
||||
* Copyright (c) 2007-2013, The Linux Foundation. All rights reserved.
|
||||
* Copyright (C) 2007 Google Incorporated
|
||||
*
|
||||
* This software is licensed under the terms of the GNU General Public
|
||||
|
@ -951,12 +951,10 @@ int _mdp_histogram_ctrl(boolean en, struct mdp_hist_mgmt *mgmt)
|
|||
int ret = 0;
|
||||
|
||||
mutex_lock(&mgmt->mdp_hist_mutex);
|
||||
if (mgmt->mdp_is_hist_start == TRUE) {
|
||||
if (en)
|
||||
ret = mdp_histogram_enable(mgmt);
|
||||
else
|
||||
ret = mdp_histogram_disable(mgmt);
|
||||
}
|
||||
if (mgmt->mdp_is_hist_start && !mgmt->mdp_is_hist_data && en)
|
||||
ret = mdp_histogram_enable(mgmt);
|
||||
else if (mgmt->mdp_is_hist_data && !en)
|
||||
ret = mdp_histogram_disable(mgmt);
|
||||
mutex_unlock(&mgmt->mdp_hist_mutex);
|
||||
|
||||
if (en == false)
|
||||
|
@ -1054,7 +1052,6 @@ int mdp_histogram_stop(struct fb_info *info, uint32_t block)
|
|||
mgmt->mdp_is_hist_start = FALSE;
|
||||
|
||||
if (!mfd->panel_power_on) {
|
||||
mgmt->mdp_is_hist_data = FALSE;
|
||||
if (mgmt->hist != NULL) {
|
||||
mgmt->hist = NULL;
|
||||
complete(&mgmt->mdp_hist_comp);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved.
|
||||
/*
|
||||
* Copyright (c) 2011-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
|
||||
|
@ -241,7 +242,7 @@ int mdp_dsi_video_on(struct platform_device *pdev)
|
|||
/*Turning on DMA_P block*/
|
||||
mdp_pipe_ctrl(MDP_DMA2_BLOCK, MDP_BLOCK_POWER_ON, FALSE);
|
||||
}
|
||||
|
||||
mdp_histogram_ctrl_all(TRUE);
|
||||
/* MDP cmd block disable */
|
||||
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF, FALSE);
|
||||
|
||||
|
@ -251,6 +252,7 @@ int mdp_dsi_video_on(struct platform_device *pdev)
|
|||
int mdp_dsi_video_off(struct platform_device *pdev)
|
||||
{
|
||||
int ret = 0;
|
||||
mdp_histogram_ctrl_all(FALSE);
|
||||
/* MDP cmd block enable */
|
||||
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE);
|
||||
MDP_OUTP(MDP_BASE + DSI_VIDEO_BASE, 0);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* Copyright (c) 2008-2009, 2012 Code Aurora Forum. All rights reserved.
|
||||
/*
|
||||
* Copyright (c) 2008-2009, 2012-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
|
||||
|
@ -308,9 +309,11 @@ int mdp_lcdc_on(struct platform_device *pdev)
|
|||
MDP_OUTP(MDP_BASE + timer_base, 1);
|
||||
mdp_pipe_ctrl(block, MDP_BLOCK_POWER_ON, FALSE);
|
||||
}
|
||||
mdp_histogram_ctrl_all(TRUE);
|
||||
/* MDP cmd block disable */
|
||||
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF, FALSE);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -329,6 +332,7 @@ int mdp_lcdc_off(struct platform_device *pdev)
|
|||
timer_base = DTV_BASE;
|
||||
}
|
||||
#endif
|
||||
mdp_histogram_ctrl_all(FALSE);
|
||||
|
||||
down(&mfd->dma->mutex);
|
||||
/* MDP cmd block enable */
|
||||
|
|
Loading…
Reference in a new issue