Merge "msm: mdss: fix bandwidth vote release for dual-dsi cmd mode panels"

This commit is contained in:
Linux Build Service Account 2014-07-18 19:20:28 -07:00 committed by Gerrit - the friendly Code Review server
commit 346451ea92
2 changed files with 32 additions and 15 deletions

View file

@ -500,6 +500,14 @@ enum mdss_screen_state {
MDSS_SCREEN_FORCE_BLANK,
};
#define mfd_to_mdp5_data(mfd) (mfd->mdp.private1)
#define mfd_to_mdata(mfd) (((struct mdss_overlay_private *)\
(mfd->mdp.private1))->mdata)
#define mfd_to_ctl(mfd) (((struct mdss_overlay_private *)\
(mfd->mdp.private1))->ctl)
#define mfd_to_wb(mfd) (((struct mdss_overlay_private *)\
(mfd->mdp.private1))->wb)
static inline struct mdss_mdp_ctl *mdss_mdp_get_split_ctl(
struct mdss_mdp_ctl *ctl)
{
@ -509,6 +517,16 @@ static inline struct mdss_mdp_ctl *mdss_mdp_get_split_ctl(
return NULL;
}
static inline struct mdss_mdp_ctl *mdss_mdp_get_main_ctl(
struct mdss_mdp_ctl *sctl)
{
if (sctl && sctl->mfd && sctl->mixer_left &&
sctl->mixer_left->is_right_mixer)
return mfd_to_ctl(sctl->mfd);
return NULL;
}
static inline bool mdss_mdp_pipe_is_yuv(struct mdss_mdp_pipe *pipe)
{
return pipe && (pipe->type == MDSS_MDP_PIPE_TYPE_VIG);
@ -858,14 +876,5 @@ int mdss_mdp_wb_set_secure(struct msm_fb_data_type *mfd, int enable);
int mdss_mdp_wb_get_secure(struct msm_fb_data_type *mfd, uint8_t *enable);
void mdss_mdp_ctl_restore(struct mdss_mdp_ctl *ctl);
int mdss_mdp_footswitch_ctrl_idle_pc(int on, struct device *dev);
#define mfd_to_mdp5_data(mfd) (mfd->mdp.private1)
#define mfd_to_mdata(mfd) (((struct mdss_overlay_private *)\
(mfd->mdp.private1))->mdata)
#define mfd_to_ctl(mfd) (((struct mdss_overlay_private *)\
(mfd->mdp.private1))->ctl)
#define mfd_to_wb(mfd) (((struct mdss_overlay_private *)\
(mfd->mdp.private1))->wb)
int mdss_mdp_ctl_reset(struct mdss_mdp_ctl *ctl);
#endif /* MDSS_MDP_H */

View file

@ -1032,9 +1032,9 @@ void mdss_mdp_ctl_perf_release_bw(struct mdss_mdp_ctl *ctl)
* released.
*/
for (i = 0; i < mdata->nctl; i++) {
struct mdss_mdp_ctl *ctl = mdata->ctl_off + i;
struct mdss_mdp_ctl *ctl_local = mdata->ctl_off + i;
if (ctl->power_on && ctl->is_video_mode)
if (ctl_local->power_on && ctl_local->is_video_mode)
goto exit;
}
@ -1043,10 +1043,18 @@ void mdss_mdp_ctl_perf_release_bw(struct mdss_mdp_ctl *ctl)
/*Release the bandwidth only if there are no transactions pending*/
if (!transaction_status) {
trace_mdp_cmd_release_bw(ctl->num);
ctl->cur_perf.bw_ctl = 0;
ctl->new_perf.bw_ctl = 0;
pr_debug("Release BW ctl=%d\n", ctl->num);
/*
* for splitdisplay if release_bw is called using secondary
* then find the main ctl and release BW for main ctl because
* BW is always calculated/stored using main ctl.
*/
struct mdss_mdp_ctl *ctl_local =
mdss_mdp_get_main_ctl(ctl) ? : ctl;
trace_mdp_cmd_release_bw(ctl_local->num);
ctl_local->cur_perf.bw_ctl = 0;
ctl_local->new_perf.bw_ctl = 0;
pr_debug("Release BW ctl=%d\n", ctl_local->num);
mdss_mdp_ctl_perf_update_bus(mdata, 0);
}
exit: