mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm_fb: display: restore previous mdp bandwidth when resume
mdp resume bandwidth is set to the value when device was suspend, so that the correct init value is set to avoid underrun. CRs-fixed: 425823 Change-Id: Ie9b832f0eb5b5e1b6cb5e8979626986d896d340b Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
This commit is contained in:
parent
0ebf5a8502
commit
f291a52af4
3 changed files with 20 additions and 9 deletions
|
@ -2360,6 +2360,9 @@ void mdp4_hw_init(void)
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int mdp_bus_scale_restore_request(void);
|
||||
|
||||
static int mdp_on(struct platform_device *pdev)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -2371,6 +2374,7 @@ static int mdp_on(struct platform_device *pdev)
|
|||
if (mdp_rev >= MDP_REV_40) {
|
||||
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE);
|
||||
mdp_clk_ctrl(1);
|
||||
mdp_bus_scale_restore_request();
|
||||
mdp4_hw_init();
|
||||
outpdw(MDP_BASE + 0x0038, mdp4_display_intf);
|
||||
if (mfd->panel.type == MIPI_CMD_PANEL) {
|
||||
|
@ -2499,10 +2503,9 @@ static int mdp_bus_scale_register(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int bus_index = 1;
|
||||
int mdp_bus_scale_update_request(u64 ab, u64 ib)
|
||||
{
|
||||
static int bus_index = 1;
|
||||
|
||||
if (mdp_bus_scale_handle < 1) {
|
||||
pr_err("%s invalid bus handle\n", __func__);
|
||||
return -EINVAL;
|
||||
|
@ -2528,6 +2531,20 @@ int mdp_bus_scale_update_request(u64 ab, u64 ib)
|
|||
return msm_bus_scale_client_update_request
|
||||
(mdp_bus_scale_handle, bus_index);
|
||||
}
|
||||
static int mdp_bus_scale_restore_request(void)
|
||||
{
|
||||
pr_debug("%s: index=%d ab=%llu ib=%llu\n", __func__, bus_index,
|
||||
mdp_bus_usecases[bus_index].vectors->ab,
|
||||
mdp_bus_usecases[bus_index].vectors->ib);
|
||||
return mdp_bus_scale_update_request
|
||||
(mdp_bus_usecases[bus_index].vectors->ab,
|
||||
mdp_bus_usecases[bus_index].vectors->ib);
|
||||
}
|
||||
#else
|
||||
static int mdp_bus_scale_restore_request(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
DEFINE_MUTEX(mdp_clk_lock);
|
||||
int mdp_set_core_clk(u32 rate)
|
||||
|
@ -3064,9 +3081,7 @@ static int mdp_probe(struct platform_device *pdev)
|
|||
return -ENOMEM;
|
||||
|
||||
/* req bus bandwidth immediately */
|
||||
if (!(mfd->cont_splash_done))
|
||||
mdp_bus_scale_update_request
|
||||
(MDP_BUS_SCALE_INIT, MDP_BUS_SCALE_INIT);
|
||||
mdp_bus_scale_update_request(mdp_max_bw, mdp_max_bw);
|
||||
#endif
|
||||
|
||||
/* set driver data */
|
||||
|
|
|
@ -33,7 +33,6 @@ extern u64 mdp_max_bw;
|
|||
#define MDP4_BW_AB_FACTOR (115) /* 1.15 */
|
||||
#define MDP4_BW_IB_FACTOR (125) /* 1.25 */
|
||||
#define MDP_BUS_SCALE_AB_STEP (0x4000000)
|
||||
#define MDP_BUS_SCALE_INIT (0x10000000)
|
||||
|
||||
#define MDP4_OVERLAYPROC0_BASE 0x10000
|
||||
#define MDP4_OVERLAYPROC1_BASE 0x18000
|
||||
|
|
|
@ -392,9 +392,6 @@ void mdp4_hw_init(void)
|
|||
/* MDP cmd block enable */
|
||||
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE);
|
||||
|
||||
mdp_bus_scale_update_request
|
||||
(MDP_BUS_SCALE_INIT, MDP_BUS_SCALE_INIT);
|
||||
|
||||
#ifdef MDP4_ERROR
|
||||
/*
|
||||
* Issue software reset on DMA_P will casue DMA_P dma engine stall
|
||||
|
|
Loading…
Reference in a new issue