mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
msm: mdss: Disable idle pc during unblank
Disable idle pc during unblank, because LPM could introduce big delay from waiting for DSI DMA. Change-Id: Id11bf3f3015fa1ea4b22d1e1c2abd380cd8b65a2 Signed-off-by: Ray Zhang <rayz@codeaurora.org>
This commit is contained in:
parent
4e1c6e6dd6
commit
f84a20fe75
1 changed files with 34 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
#include <linux/leds-qpnp-wled.h>
|
||||
#include <linux/clk.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/pm_qos.h>
|
||||
|
||||
#include "mdss.h"
|
||||
#include "mdss_panel.h"
|
||||
|
@ -36,6 +37,30 @@
|
|||
/* Master structure to hold all the information about the DSI/panel */
|
||||
static struct mdss_dsi_data *mdss_dsi_res;
|
||||
|
||||
#define DSI_DISABLE_PC_LATENCY 100
|
||||
#define DSI_ENABLE_PC_LATENCY PM_QOS_DEFAULT_VALUE
|
||||
|
||||
static struct pm_qos_request mdss_dsi_pm_qos_request;
|
||||
|
||||
static void mdss_dsi_pm_qos_add_request(void)
|
||||
{
|
||||
pr_debug("%s: add request", __func__);
|
||||
pm_qos_add_request(&mdss_dsi_pm_qos_request, PM_QOS_CPU_DMA_LATENCY,
|
||||
PM_QOS_DEFAULT_VALUE);
|
||||
}
|
||||
|
||||
static void mdss_dsi_pm_qos_remove_request(void)
|
||||
{
|
||||
pr_debug("%s: remove request", __func__);
|
||||
pm_qos_remove_request(&mdss_dsi_pm_qos_request);
|
||||
}
|
||||
|
||||
static void mdss_dsi_pm_qos_update_request(int val)
|
||||
{
|
||||
pr_debug("%s: update request %d", __func__, val);
|
||||
pm_qos_update_request(&mdss_dsi_pm_qos_request, val);
|
||||
}
|
||||
|
||||
static int mdss_dsi_pinctrl_set_state(struct mdss_dsi_ctrl_pdata *ctrl_pdata,
|
||||
bool active);
|
||||
|
||||
|
@ -1342,6 +1367,8 @@ static int mdss_dsi_unblank(struct mdss_panel_data *pdata)
|
|||
pr_debug("%s+: ctrl=%p ndx=%d cur_blank_state=%d\n", __func__,
|
||||
ctrl_pdata, ctrl_pdata->ndx, pdata->panel_info.blank_state);
|
||||
|
||||
mdss_dsi_pm_qos_update_request(DSI_DISABLE_PC_LATENCY);
|
||||
|
||||
mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 1);
|
||||
|
||||
if (pdata->panel_info.blank_state == MDSS_PANEL_BLANK_LOW_POWER) {
|
||||
|
@ -1372,6 +1399,9 @@ static int mdss_dsi_unblank(struct mdss_panel_data *pdata)
|
|||
|
||||
error:
|
||||
mdss_dsi_clk_ctrl(ctrl_pdata, DSI_ALL_CLKS, 0);
|
||||
|
||||
mdss_dsi_pm_qos_update_request(DSI_ENABLE_PC_LATENCY);
|
||||
|
||||
pr_debug("%s-:\n", __func__);
|
||||
|
||||
return ret;
|
||||
|
@ -2329,6 +2359,8 @@ static int mdss_dsi_ctrl_probe(struct platform_device *pdev)
|
|||
|
||||
INIT_DELAYED_WORK(&ctrl_pdata->dba_work, mdss_dsi_dba_work);
|
||||
|
||||
mdss_dsi_pm_qos_add_request();
|
||||
|
||||
pr_debug("%s: Dsi Ctrl->%d initialized\n", __func__, index);
|
||||
return 0;
|
||||
|
||||
|
@ -2695,6 +2727,8 @@ static int mdss_dsi_ctrl_remove(struct platform_device *pdev)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
mdss_dsi_pm_qos_remove_request();
|
||||
|
||||
if (msm_dss_config_vreg(&pdev->dev,
|
||||
ctrl_pdata->panel_power_data.vreg_config,
|
||||
ctrl_pdata->panel_power_data.num_vreg, 1) < 0)
|
||||
|
|
Loading…
Reference in a new issue