Re: [PATCH] drm/mediatek: dp: Add phy_mtk_dp module as pre-dependency

From: Nícolas F. R. A. Prado
Date: Tue Nov 21 2023 - 09:07:37 EST


On Tue, Nov 21, 2023 at 11:59:14AM +0100, AngeloGioacchino Del Regno wrote:
> Il 20/11/23 21:28, Nícolas F. R. A. Prado ha scritto:
> > The mtk_dp driver registers a phy device which is handled by the
> > phy_mtk_dp driver and assumes that the phy probe will complete
> > synchronously, proceeding to make use of functionality exposed by that
> > driver right away. This assumption however is false when the phy driver
> > is built as a module, causing the mtk_dp driver to fail probe in this
> > case.
> >
> > Add the phy_mtk_dp module as a pre-dependency to the mtk_dp module to
> > ensure the phy module has been loaded before the dp, so that the phy
> > probe happens synchrounously and the mtk_dp driver can probe
> > successfully even with the phy driver built as a module.
> >
>
> You forgot a Suggested-by here :-P

Oops, sorry, I forgot that tag existed. Will send a v2 with it added :).

>
> > Fixes: f70ac097a2cf ("drm/mediatek: Add MT8195 Embedded DisplayPort driver")
> > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
>
> It's fine anyway; being the best solution that we can use:
>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
>
> >
> > ---
> >
> > drivers/gpu/drm/mediatek/mtk_dp.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/mediatek/mtk_dp.c b/drivers/gpu/drm/mediatek/mtk_dp.c
> > index e4c16ba9902d..2136a596efa1 100644
> > --- a/drivers/gpu/drm/mediatek/mtk_dp.c
> > +++ b/drivers/gpu/drm/mediatek/mtk_dp.c
> > @@ -2818,3 +2818,4 @@ MODULE_AUTHOR("Markus Schneider-Pargmann <msp@xxxxxxxxxxxx>");
> > MODULE_AUTHOR("Bo-Chen Chen <rex-bc.chen@xxxxxxxxxxxx>");
> > MODULE_DESCRIPTION("MediaTek DisplayPort Driver");
> > MODULE_LICENSE("GPL");
> > +MODULE_SOFTDEP("pre: phy_mtk_dp");
>