Merge "msm: mdss: Set LM flush bit for DE/Scalar reg update"
This commit is contained in:
commit
cd42f16f98
3 changed files with 15 additions and 4 deletions
|
@ -2023,6 +2023,8 @@ void mdss_mdp_set_supported_formats(struct mdss_data_type *mdata);
|
||||||
int mdss_mdp_dest_scaler_setup_locked(struct mdss_mdp_mixer *mixer);
|
int mdss_mdp_dest_scaler_setup_locked(struct mdss_mdp_mixer *mixer);
|
||||||
void *mdss_mdp_intf_get_ctx_base(struct mdss_mdp_ctl *ctl, int intf_num);
|
void *mdss_mdp_intf_get_ctx_base(struct mdss_mdp_ctl *ctl, int intf_num);
|
||||||
|
|
||||||
|
int mdss_mdp_mixer_get_hw_num(struct mdss_mdp_mixer *mixer);
|
||||||
|
|
||||||
#ifdef CONFIG_FB_MSM_MDP_NONE
|
#ifdef CONFIG_FB_MSM_MDP_NONE
|
||||||
struct mdss_data_type *mdss_mdp_get_mdata(void)
|
struct mdss_data_type *mdss_mdp_get_mdata(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4802,7 +4802,7 @@ static void __mdss_mdp_mixer_get_offsets(u32 mixer_num,
|
||||||
offsets[2] = MDSS_MDP_REG_CTL_LAYER_EXTN2(mixer_num);
|
offsets[2] = MDSS_MDP_REG_CTL_LAYER_EXTN2(mixer_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int __mdss_mdp_mixer_get_hw_num(struct mdss_mdp_mixer *mixer)
|
int mdss_mdp_mixer_get_hw_num(struct mdss_mdp_mixer *mixer)
|
||||||
{
|
{
|
||||||
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
|
struct mdss_data_type *mdata = mdss_mdp_get_mdata();
|
||||||
|
|
||||||
|
@ -4858,7 +4858,7 @@ static void __mdss_mdp_mixer_write_cfg(struct mdss_mdp_mixer *mixer,
|
||||||
if (!mixer)
|
if (!mixer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
mixer_num = __mdss_mdp_mixer_get_hw_num(mixer);
|
mixer_num = mdss_mdp_mixer_get_hw_num(mixer);
|
||||||
|
|
||||||
if (cfg) {
|
if (cfg) {
|
||||||
for (i = 0; i < NUM_MIXERCFG_REGS; i++)
|
for (i = 0; i < NUM_MIXERCFG_REGS; i++)
|
||||||
|
@ -4905,7 +4905,7 @@ bool mdss_mdp_mixer_reg_has_pipe(struct mdss_mdp_mixer *mixer,
|
||||||
|
|
||||||
memset(&mixercfg, 0, sizeof(mixercfg));
|
memset(&mixercfg, 0, sizeof(mixercfg));
|
||||||
|
|
||||||
mixer_num = __mdss_mdp_mixer_get_hw_num(mixer);
|
mixer_num = mdss_mdp_mixer_get_hw_num(mixer);
|
||||||
__mdss_mdp_mixer_get_offsets(mixer_num, offs, NUM_MIXERCFG_REGS);
|
__mdss_mdp_mixer_get_offsets(mixer_num, offs, NUM_MIXERCFG_REGS);
|
||||||
|
|
||||||
for (i = 0; i < NUM_MIXERCFG_REGS; i++)
|
for (i = 0; i < NUM_MIXERCFG_REGS; i++)
|
||||||
|
@ -5130,7 +5130,7 @@ static void mdss_mdp_mixer_setup(struct mdss_mdp_ctl *master_ctl,
|
||||||
mixercfg.cursor_enabled = true;
|
mixercfg.cursor_enabled = true;
|
||||||
|
|
||||||
update_mixer:
|
update_mixer:
|
||||||
mixer_num = __mdss_mdp_mixer_get_hw_num(mixer_hw);
|
mixer_num = mdss_mdp_mixer_get_hw_num(mixer_hw);
|
||||||
ctl_hw->flush_bits |= BIT(mixer_num < 5 ? 6 + mixer_num : 20);
|
ctl_hw->flush_bits |= BIT(mixer_num < 5 ? 6 + mixer_num : 20);
|
||||||
|
|
||||||
/* Read GC enable/disable status on LM */
|
/* Read GC enable/disable status on LM */
|
||||||
|
|
|
@ -2599,6 +2599,7 @@ int mdss_mdp_dest_scaler_setup_locked(struct mdss_mdp_mixer *mixer)
|
||||||
u32 op_mode;
|
u32 op_mode;
|
||||||
u32 mask;
|
u32 mask;
|
||||||
char *ds_offset;
|
char *ds_offset;
|
||||||
|
int mixer_num = 0;
|
||||||
|
|
||||||
if (!mixer || !mixer->ctl || !mixer->ctl->mdata)
|
if (!mixer || !mixer->ctl || !mixer->ctl->mdata)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -2658,6 +2659,14 @@ int mdss_mdp_dest_scaler_setup_locked(struct mdss_mdp_mixer *mixer)
|
||||||
pr_err("Failed setup destination scaler\n");
|
pr_err("Failed setup destination scaler\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
/* Set LM Flush in order to update DS registers */
|
||||||
|
if (ds->flags & DS_SCALE_UPDATE) {
|
||||||
|
mutex_lock(&ctl->flush_lock);
|
||||||
|
mixer_num = mdss_mdp_mixer_get_hw_num(mixer);
|
||||||
|
ctl->flush_bits |=
|
||||||
|
BIT(mixer_num < 5 ? 6 + mixer_num : 20);
|
||||||
|
mutex_unlock(&ctl->flush_lock);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* Clearing the flag because we don't need to program the block
|
* Clearing the flag because we don't need to program the block
|
||||||
* for each commit if there is no change.
|
* for each commit if there is no change.
|
||||||
|
|
Loading…
Add table
Reference in a new issue