[PATCH v3 04/19] drm/msm/dpu: drop dpu_mdss_cfg::mdp_count field

Marijn Suijten marijn.suijten at somainline.org
Fri Jun 16 22:44:00 UTC 2023


On 2023-06-17 00:41:40, Marijn Suijten wrote:
<snip>
> > -	cfg = _top_offset(idx, m, addr, &mdp->hw);
> > -	if (IS_ERR_OR_NULL(cfg)) {
> > -		kfree(mdp);
> > -		return ERR_PTR(-EINVAL);
> > -	}
> > +	mdp->hw.blk_addr = addr + m->mdp->base;
> > +	mdp->hw.log_mask = DPU_DBG_MASK_TOP;
> 
> You lost the assignment of m->mdp to the local cfg variable, causing
> mdp->caps = cfg; below to remain NULL.

To solve that in a clean way, you might as well pass `const struct
dpu_mdp_cfg *cfg` directly from dpu_kms.c into dpu_hw_mdptop_init, as I
did for the other HW blocks in "Pass catalog pointers in RM to replace
for-loop ID lookups".

- Marijn


More information about the dri-devel mailing list