msm: mdss: Extend fb instance to handle other split types
Add split_mode in mfd to support other split types. 1) Mixer split 2) Ping Pong Split Change-Id: Idcaa6aaa7ad5e78608d2e18137e3d987843d7699 Signed-off-by: Kalyan Thota <kalyant@codeaurora.org>
This commit is contained in:
parent
e9b50cd22c
commit
cb25aa9770
4 changed files with 41 additions and 11 deletions
|
@ -280,7 +280,7 @@ static inline int mdss_fb_validate_split(int left, int right,
|
|||
u32 panel_xres = mfd->panel_info->xres;
|
||||
/* more validate condition could be added if needed */
|
||||
if (left && right) {
|
||||
if (mfd->split_display)
|
||||
if (is_panel_split(mfd))
|
||||
panel_xres *= 2;
|
||||
|
||||
if (panel_xres == left + right) {
|
||||
|
@ -289,7 +289,7 @@ static inline int mdss_fb_validate_split(int left, int right,
|
|||
rc = 0;
|
||||
}
|
||||
} else {
|
||||
if (mfd->split_display) {
|
||||
if (is_panel_split(mfd)) {
|
||||
mfd->split_fb_left = mfd->split_fb_right = panel_xres;
|
||||
rc = 0;
|
||||
} else {
|
||||
|
@ -615,8 +615,9 @@ static int mdss_fb_probe(struct platform_device *pdev)
|
|||
mfd->fb_imgType = MDP_RGBA_8888;
|
||||
|
||||
mfd->pdev = pdev;
|
||||
mfd->split_mode = MDP_SPLIT_MODE_NONE;
|
||||
if (pdata->next)
|
||||
mfd->split_display = true;
|
||||
mfd->split_mode = MDP_SPLIT_MODE_LM;
|
||||
mfd->mdp = *mdp_instance;
|
||||
INIT_LIST_HEAD(&mfd->proc_list);
|
||||
|
||||
|
@ -1596,7 +1597,7 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
|
|||
}
|
||||
|
||||
var->xres = panel_info->xres;
|
||||
if (mfd->split_display)
|
||||
if (is_panel_split(mfd))
|
||||
var->xres *= 2;
|
||||
|
||||
fix->type = panel_info->is_3d_panel;
|
||||
|
|
|
@ -71,6 +71,20 @@ enum mdp_notify_event {
|
|||
MDP_NOTIFY_FRAME_TIMEOUT,
|
||||
};
|
||||
|
||||
/**
|
||||
* enum mdp_split_mode - Lists the possible split modes in the device
|
||||
*
|
||||
* @MDP_SPLIT_MODE_NONE: Not a Dual display, no panel split.
|
||||
* @MDP_SPLIT_MODE_LM: Dual Display is true, Split across layer mixers
|
||||
* @MDP_SPLIT_MODE_DST: Dual Display is true, Split is in the Destination
|
||||
* i.e ping pong split.
|
||||
*/
|
||||
enum mdp_split_mode {
|
||||
MDP_SPLIT_MODE_NONE,
|
||||
MDP_SPLIT_MODE_LM,
|
||||
MDP_SPLIT_MODE_DST,
|
||||
};
|
||||
|
||||
struct disp_info_type_suspend {
|
||||
int op_enable;
|
||||
int panel_power_on;
|
||||
|
@ -167,7 +181,7 @@ struct msm_fb_data_type {
|
|||
|
||||
struct panel_id panel;
|
||||
struct mdss_panel_info *panel_info;
|
||||
int split_display;
|
||||
int split_mode;
|
||||
int split_fb_left;
|
||||
int split_fb_right;
|
||||
|
||||
|
@ -261,6 +275,21 @@ static inline void mdss_fb_update_notify_update(struct msm_fb_data_type *mfd)
|
|||
}
|
||||
}
|
||||
|
||||
/* Function returns true for either Layer Mixer split or Ping pong split */
|
||||
static inline bool is_panel_split(struct msm_fb_data_type *mfd)
|
||||
{
|
||||
return (mfd && (!(mfd->split_mode == MDP_SPLIT_MODE_NONE)));
|
||||
}
|
||||
/* Function returns true, if Layer Mixer split is Set*/
|
||||
static inline bool is_split_lm(struct msm_fb_data_type *mfd)
|
||||
{
|
||||
return (mfd && (mfd->split_mode == MDP_SPLIT_MODE_LM));
|
||||
}
|
||||
/* Function returns true, if Ping pong split is Set*/
|
||||
static inline bool is_split_dst(struct msm_fb_data_type *mfd)
|
||||
{
|
||||
return (mfd && (mfd->split_mode == MDP_SPLIT_MODE_DST));
|
||||
}
|
||||
int mdss_fb_get_phys_info(dma_addr_t *start, unsigned long *len, int fb_num);
|
||||
void mdss_fb_set_backlight(struct msm_fb_data_type *mfd, u32 bkl_lvl);
|
||||
void mdss_fb_update_backlight(struct msm_fb_data_type *mfd);
|
||||
|
|
|
@ -1852,7 +1852,7 @@ static void mdss_mdp_overlay_pan_display(struct msm_fb_data_type *mfd)
|
|||
pipe->has_buf = 1;
|
||||
mdss_mdp_pipe_unmap(pipe);
|
||||
|
||||
if (fbi->var.xres > mdata->max_mixer_width || mfd->split_display) {
|
||||
if (fbi->var.xres > mdata->max_mixer_width || is_split_lm(mfd)) {
|
||||
ret = mdss_mdp_overlay_get_fb_pipe(mfd, &pipe,
|
||||
MDSS_MDP_MIXER_MUX_RIGHT);
|
||||
if (ret) {
|
||||
|
@ -3086,7 +3086,7 @@ static struct mdss_mdp_ctl *__mdss_mdp_overlay_ctl_init(
|
|||
INIT_WORK(&ctl->remove_underrun_handler,
|
||||
remove_underrun_vsync_handler);
|
||||
|
||||
if (mfd->split_display && pdata->next) {
|
||||
if (is_split_lm(mfd)) {
|
||||
/* enable split display */
|
||||
rc = mdss_mdp_ctl_split_display_setup(ctl, pdata->next);
|
||||
if (rc) {
|
||||
|
@ -3331,7 +3331,7 @@ static int mdss_mdp_overlay_handoff(struct msm_fb_data_type *mfd)
|
|||
goto error;
|
||||
}
|
||||
|
||||
if (mfd->split_display) {
|
||||
if (is_split_lm(mfd)) {
|
||||
sctl = mdss_mdp_get_split_ctl(ctl);
|
||||
if (!sctl) {
|
||||
pr_err("cannot get secondary ctl. fail the handoff\n");
|
||||
|
@ -3529,7 +3529,7 @@ int mdss_mdp_overlay_init(struct msm_fb_data_type *mfd)
|
|||
mfd->mdp.private1 = mdp5_data;
|
||||
mfd->wait_for_kickoff = true;
|
||||
|
||||
if (mfd->panel_info->partial_update_enabled && mfd->split_display)
|
||||
if (mfd->panel_info->partial_update_enabled && is_split_lm(mfd))
|
||||
mdp5_data->mdata->has_src_split = false;
|
||||
|
||||
rc = mdss_mdp_overlay_fb_parse_dt(mfd);
|
||||
|
|
|
@ -334,8 +334,8 @@ static int mdss_mdp_splash_kickoff(struct msm_fb_data_type *mfd,
|
|||
* buffer boundry
|
||||
*/
|
||||
use_single_pipe =
|
||||
!mfd->split_display ||
|
||||
(mfd->split_display &&
|
||||
!is_split_lm(mfd) ||
|
||||
(is_split_lm(mfd) &&
|
||||
((dest_rect->x + dest_rect->w) < mfd->split_fb_left ||
|
||||
dest_rect->x > mfd->split_fb_left)) ||
|
||||
(mdata->has_src_split &&
|
||||
|
|
Loading…
Add table
Reference in a new issue