On 17/06/2023 01:44, Marijn Suijten wrote:
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".
Sounds good.
--
With best wishes
Dmitry