/* Already reserved? */
if (reserved_by_other(global_state->mixer_to_crtc_id, lm_idx, crtc_id)) {
- DPU_DEBUG("lm %d already reserved\n", lm_idx + LM_0);
+ DPU_DEBUG("LM_%d already reserved\n", lm_idx);
return false;
}
lm_cfg = to_dpu_hw_mixer(rm->mixer_blks[lm_idx])->cap;
idx = lm_cfg->pingpong - PINGPONG_0;
- if (idx < 0 || idx >= ARRAY_SIZE(rm->pingpong_blks)) {
- DPU_ERROR("failed to get pp on lm %d\n", lm_cfg->pingpong);
+ if (idx < 0 || idx >= ARRAY_SIZE(rm->pingpong_blks) || !rm->pingpong_blks[idx]) {
+ DPU_ERROR("LM_%d, invalid PP_%d\n", lm_idx, idx);
return false;
}
if (reserved_by_other(global_state->pingpong_to_crtc_id, idx, crtc_id)) {
- DPU_DEBUG("lm %d pp %d already reserved\n", lm_cfg->id,
- lm_cfg->pingpong);
+ DPU_DEBUG("LM_%d PP_%d already reserved\n", lm_idx, idx);
return false;
}
*pp_idx = idx;
return true;
idx = lm_cfg->dspp - DSPP_0;
- if (idx < 0 || idx >= ARRAY_SIZE(rm->dspp_blks)) {
- DPU_ERROR("failed to get dspp on lm %d\n", lm_cfg->dspp);
+ if (idx < 0 || idx >= ARRAY_SIZE(rm->dspp_blks) || !rm->dspp_blks[idx]) {
+ DPU_ERROR("LM_%d, invalid DSPP_%d\n", lm_idx, idx);
return false;
}
if (reserved_by_other(global_state->dspp_to_crtc_id, idx, crtc_id)) {
- DPU_DEBUG("lm %d dspp %d already reserved\n", lm_cfg->id,
- lm_cfg->dspp);
+ DPU_DEBUG("LM_%d DSPP_%d already reserved\n", lm_idx, idx);
return false;
}
*dspp_idx = idx;
int i, lm_count = 0;
if (!topology->num_lm) {
- DPU_ERROR("invalid number of lm: %d\n", topology->num_lm);
+ DPU_ERROR("zero LMs in topology\n");
return -EINVAL;
}
features = ctl->caps->features;
has_split_display = BIT(DPU_CTL_SPLIT_DISPLAY) & features;
- DPU_DEBUG("ctl %d caps 0x%lX\n", j + CTL_0, features);
+ DPU_DEBUG("CTL_%d caps 0x%lX\n", j, features);
if (needs_split_display != has_split_display)
continue;
ctl_idx[i] = j;
- DPU_DEBUG("ctl %d match\n", j + CTL_0);
+ DPU_DEBUG("CTL_%d match\n", j);
if (++i == num_ctls)
break;