msm: mdss: add support to change border color through debugfs
During blending operation, bottom color is known as border color and it is same size as mixer dimensions. Default color is black but it can be configured to different color. This is very useful for debugging purpose. Add support to program border-color through debugfs as per following guidelines. echo code > <debugfs>/mdp/bordercolor/colorN where code: 12bit color value in decimal colorN: color0, color1, color2 Change-Id: Ia3e8791713f5aa309a95c867445995ced028dd8d Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
This commit is contained in:
parent
129d5ad772
commit
a88c5d35b9
5 changed files with 29 additions and 2 deletions
|
@ -411,6 +411,10 @@ struct mdss_data_type {
|
||||||
struct mdss_max_bw_settings *max_bw_settings;
|
struct mdss_max_bw_settings *max_bw_settings;
|
||||||
u32 bw_mode_bitmap;
|
u32 bw_mode_bitmap;
|
||||||
u32 max_bw_settings_cnt;
|
u32 max_bw_settings_cnt;
|
||||||
|
|
||||||
|
u32 bcolor0;
|
||||||
|
u32 bcolor1;
|
||||||
|
u32 bcolor2;
|
||||||
};
|
};
|
||||||
extern struct mdss_data_type *mdss_res;
|
extern struct mdss_data_type *mdss_res;
|
||||||
|
|
||||||
|
|
|
@ -1095,6 +1095,13 @@ int mdss_debugfs_init(struct mdss_data_type *mdata)
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mdd->bordercolor = debugfs_create_dir("bordercolor", mdd->root);
|
||||||
|
if (IS_ERR_OR_NULL(mdd->root)) {
|
||||||
|
pr_err("debugfs_create_dir for mdp failed, error %ld\n",
|
||||||
|
PTR_ERR(mdd->root));
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
|
||||||
mdss_debugfs_perf_init(mdd, mdata);
|
mdss_debugfs_perf_init(mdd, mdata);
|
||||||
|
|
||||||
if (mdss_create_xlog_debug(mdd))
|
if (mdss_create_xlog_debug(mdd))
|
||||||
|
|
|
@ -91,6 +91,7 @@ struct mdss_debug_base {
|
||||||
struct mdss_debug_data {
|
struct mdss_debug_data {
|
||||||
struct dentry *root;
|
struct dentry *root;
|
||||||
struct dentry *perf;
|
struct dentry *perf;
|
||||||
|
struct dentry *bordercolor;
|
||||||
struct list_head base_list;
|
struct list_head base_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3601,15 +3601,23 @@ update_mixer:
|
||||||
mixer_op_mode |= BIT(31);
|
mixer_op_mode |= BIT(31);
|
||||||
|
|
||||||
mdp_mixer_write(mixer, MDSS_MDP_REG_LM_OP_MODE, mixer_op_mode);
|
mdp_mixer_write(mixer, MDSS_MDP_REG_LM_OP_MODE, mixer_op_mode);
|
||||||
|
|
||||||
|
mdp_mixer_write(mixer, MDSS_MDP_REG_LM_BORDER_COLOR_0,
|
||||||
|
(mdata->bcolor0 & 0xFFF) | ((mdata->bcolor1 & 0xFFF) << 16));
|
||||||
|
mdp_mixer_write(mixer, MDSS_MDP_REG_LM_BORDER_COLOR_1,
|
||||||
|
mdata->bcolor2 & 0xFFF);
|
||||||
|
|
||||||
off = __mdss_mdp_ctl_get_mixer_off(mixer);
|
off = __mdss_mdp_ctl_get_mixer_off(mixer);
|
||||||
mdss_mdp_ctl_write(ctl, off, mixercfg);
|
mdss_mdp_ctl_write(ctl, off, mixercfg);
|
||||||
/* Program ctl layer extension bits */
|
/* Program ctl layer extension bits */
|
||||||
mdss_mdp_ctl_write(ctl, off + MDSS_MDP_REG_CTL_LAYER_EXTN_OFFSET,
|
mdss_mdp_ctl_write(ctl, off + MDSS_MDP_REG_CTL_LAYER_EXTN_OFFSET,
|
||||||
mixercfg_extn);
|
mixercfg_extn);
|
||||||
|
|
||||||
pr_debug("mixer=%d cfg=0%08x cfg_extn=0x%08x op_mode=0x%08x w=%d h=%d\n",
|
pr_debug("mixer=%d cfg=0%08x cfg_extn=0x%08x op_mode=0x%08x w=%d h=%d bc0=0x%x bc1=0x%x\n",
|
||||||
mixer->num, mixercfg, mixercfg_extn,
|
mixer->num, mixercfg, mixercfg_extn,
|
||||||
mixer_op_mode, mixer->roi.w, mixer->roi.h);
|
mixer_op_mode, mixer->roi.w, mixer->roi.h,
|
||||||
|
(mdata->bcolor0 & 0xFFF) | ((mdata->bcolor1 & 0xFFF) << 16),
|
||||||
|
mdata->bcolor2 & 0xFFF);
|
||||||
MDSS_XLOG(mixer->num, mixercfg, mixercfg_extn, mixer_op_mode,
|
MDSS_XLOG(mixer->num, mixercfg, mixercfg_extn, mixer_op_mode,
|
||||||
mixer->roi.h, mixer->roi.w);
|
mixer->roi.h, mixer->roi.w);
|
||||||
}
|
}
|
||||||
|
|
|
@ -389,6 +389,13 @@ int mdss_mdp_debugfs_init(struct mdss_data_type *mdata)
|
||||||
debugfs_create_u32("serialize_wait4pp", 0644, mdd->root,
|
debugfs_create_u32("serialize_wait4pp", 0644, mdd->root,
|
||||||
(u32 *)&mdata->serialize_wait4pp);
|
(u32 *)&mdata->serialize_wait4pp);
|
||||||
|
|
||||||
|
debugfs_create_u32("color0", 0644, mdd->bordercolor,
|
||||||
|
(u32 *)&mdata->bcolor0);
|
||||||
|
debugfs_create_u32("color1", 0644, mdd->bordercolor,
|
||||||
|
(u32 *)&mdata->bcolor1);
|
||||||
|
debugfs_create_u32("color2", 0644, mdd->bordercolor,
|
||||||
|
(u32 *)&mdata->bcolor2);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue