Merge "disp: msm: sde: avoid mixer op setup for virtual LM" into display-kernel.lnx.5.10

Tento commit je obsažen v:
Linux Build Service Account
2021-05-21 10:05:11 -07:00
odevzdal Gerrit - the friendly Code Review server
4 změnil soubory, kde provedl 24 přidání a 16 odebrání

Zobrazit soubor

@@ -641,8 +641,9 @@ static void _sde_crtc_setup_blend_cfg(struct sde_crtc_mixer *mixer,
break;
}
lm->ops.setup_blend_config(lm, pstate->stage, fg_alpha,
bg_alpha, blend_op);
if (lm->ops.setup_blend_config)
lm->ops.setup_blend_config(lm, pstate->stage, fg_alpha, bg_alpha, blend_op);
SDE_DEBUG(
"format: %4.4s, alpha_enable %u fg alpha:0x%x bg alpha:0x%x blend_op:0x%x\n",
(char *) &format->base.pixel_format,
@@ -1284,6 +1285,7 @@ static void _sde_crtc_program_lm_output_roi(struct drm_crtc *crtc)
cfg.right_mixer = right_mixer;
cfg.flags = 0;
if (hw_lm->ops.setup_mixer_out)
hw_lm->ops.setup_mixer_out(hw_lm, &cfg);
lm_updated = true;
}
@@ -1828,6 +1830,7 @@ static void _sde_crtc_blend_setup(struct drm_crtc *crtc,
if (sde_kms_rect_is_null(lm_roi))
sde_crtc->mixers[i].mixer_op_mode = 0;
if (lm->ops.setup_alpha_out)
lm->ops.setup_alpha_out(lm, mixer[i].mixer_op_mode);
/* stage config flush mask */
@@ -6463,24 +6466,22 @@ static ssize_t _sde_crtc_misr_read(struct file *file,
m = &sde_crtc->mixers[i];
if (!m->hw_lm || !m->hw_lm->ops.collect_misr) {
len += scnprintf(buf + len, MISR_BUFF_SIZE - len,
"invalid\n");
if (!m->hw_lm || !m->hw_lm->cap->dummy_mixer) {
len += scnprintf(buf + len, MISR_BUFF_SIZE - len, "invalid\n");
SDE_ERROR("crtc:%d invalid misr ops\n", DRMID(crtc));
}
continue;
}
rc = m->hw_lm->ops.collect_misr(m->hw_lm, false, &misr_value);
if (rc) {
len += scnprintf(buf + len, MISR_BUFF_SIZE - len,
"invalid\n");
SDE_ERROR("crtc:%d failed to collect misr %d\n",
DRMID(crtc), rc);
len += scnprintf(buf + len, MISR_BUFF_SIZE - len, "invalid\n");
SDE_ERROR("crtc:%d failed to collect misr %d\n", DRMID(crtc), rc);
continue;
} else {
len += scnprintf(buf + len, MISR_BUFF_SIZE - len,
"lm idx:%d\n", m->hw_lm->idx - LM_0);
len += scnprintf(buf + len, MISR_BUFF_SIZE - len,
"0x%x\n", misr_value);
len += scnprintf(buf + len, MISR_BUFF_SIZE - len, "0x%x\n", misr_value);
}
}

Zobrazit soubor

@@ -2175,8 +2175,7 @@ void sde_hw_mixer_set_preference(struct sde_mdss_cfg *sde_cfg, u32 num_lm,
}
}
static int sde_mixer_parse_dt(struct device_node *np,
struct sde_mdss_cfg *sde_cfg)
static int sde_mixer_parse_dt(struct device_node *np, struct sde_mdss_cfg *sde_cfg)
{
int rc = 0, i, j;
u32 off_count, blend_off_count, max_blendstages, lm_pair_mask;
@@ -2290,6 +2289,7 @@ static int sde_mixer_parse_dt(struct device_node *np,
if (mixer->base == dummy_mixer_base) {
mixer->base = 0x0;
mixer->len = 0;
mixer->dummy_mixer = true;
}
}

Zobrazit soubor

@@ -1060,6 +1060,7 @@ struct sde_sspp_cfg {
* @dspp: ID of connected DSPP, DSPP_MAX if unsupported
* @pingpong: ID of connected PingPong, PINGPONG_MAX if unsupported
* @ds: ID of connected DS, DS_MAX if unsupported
* @dummy_mixer: identifies dcwb mixer is considered dummy
* @lm_pair_mask: Bitmask of LMs that can be controlled by same CTL
*/
struct sde_lm_cfg {
@@ -1068,6 +1069,7 @@ struct sde_lm_cfg {
u32 dspp;
u32 pingpong;
u32 ds;
bool dummy_mixer;
unsigned long lm_pair_mask;
};

Zobrazit soubor

@@ -422,7 +422,6 @@ struct sde_hw_mixer *sde_hw_lm_init(enum sde_lm idx,
/* Assign ops */
c->idx = idx;
c->cap = cfg;
_setup_mixer_ops(m, &c->ops, c->cap->features);
rc = sde_hw_blk_init(&c->base, SDE_HW_BLK_LM, idx, &sde_hw_ops);
if (rc) {
@@ -430,6 +429,12 @@ struct sde_hw_mixer *sde_hw_lm_init(enum sde_lm idx,
goto blk_init_error;
}
/* Dummy mixers should not setup ops and not be added to dump range */
if (cfg->dummy_mixer)
return c;
_setup_mixer_ops(m, &c->ops, c->cap->features);
sde_dbg_reg_register_dump_range(SDE_DBG_NAME, cfg->name, c->hw.blk_off,
c->hw.blk_off + c->hw.length, c->hw.xin_id);