Re: [PATCH] drm/msm: Initialize MDSS irq domain at probe time

From: Dmitry Baryshkov
Date: Fri Nov 26 2021 - 16:18:48 EST


On 26/11/2021 12:26, AngeloGioacchino Del Regno wrote:
Il 26/11/21 01:06, Dmitry Baryshkov ha scritto:
On 25/11/2021 18:09, AngeloGioacchino Del Regno wrote:
Since commit 8f59ee9a570c ("drm/msm/dsi: Adjust probe order"), the
DSI host gets initialized earlier, but this caused unability to probe
the entire stack of components because they all depend on interrupts
coming from the main `mdss` node (mdp5, or dpu1).

To fix this issue, also anticipate probing mdp5 or dpu1 by initializing
them at msm_pdev_probe() time: this will make sure that we add the
required interrupt controller mapping before dsi and/or other components
try to initialize, finally satisfying the dependency.

While at it, also change the allocation of msm_drm_private to use the
devm variant of kzalloc().

Fixes: 8f59ee9a570c ("drm/msm/dsi: Adjust probe order")
Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>

Another issue (or a pack of issues):
Now the msm_drm_init() is unbalanced with msm_drm_uninit(). Bits of code (putting the drm dev, removing the IRQ domain, etc) have to be called now from the msm_pdev_remove() function rather than from the unbind path.

The following changes fix the observed issues here, however additional care should be taken.



Hello Dmitry,

thanks for the thorough review (and solutions!).
Are you going to push your changes on top, or should I send a V2?

Please send a v2. As you see, my suggestions have to be validated too (and they were based on crashes/issues observed locally).


--
With best wishes
Dmitry