Re: [PATCH] remoteproc: mediatek: Don't print error when optional scp handle is missing

From: Nícolas F. R. A. Prado
Date: Thu Jun 06 2024 - 15:11:22 EST


On Thu, Jun 06, 2024 at 12:50:56PM +0200, AngeloGioacchino Del Regno wrote:
> Il 05/06/24 21:35, Nícolas F. R. A. Prado ha scritto:
> > The scp_get() helper has two users: the mtk-vcodec and the mtk-mdp3
> > drivers. mdp3 considers the mediatek,scp phandle optional, and when it's
> > missing mdp3 will directly look for the scp node based on compatible.
> >
> > For that reason printing an error in the helper when the handle is
> > missing is wrong, as it's not always an actual error. Besides, the other
> > user, vcodec, already prints an error message on its own when the helper
> > fails so this message doesn't add that much information.
> >
> > Remove the error message from the helper. This gets rid of the deceptive
> > error on MT8195-Tomato:
> >
> > mtk-mdp3 14001000.dma-controller: can't get SCP node
>
> I'm way more for giving it a SCP handle instead of silencing this print... the
> SCP handle way *is* the correct one and I prefer it, as that'd also be the only
> way to support Dual-Core SCP in MDP3.
>
> I really want to see hardcoded stuff disappear and I really really *really* want
> to see more consistency across DT nodes in MediaTek platforms.
>
> So, still a one-line change, but do it on the devicetree instead of here please.

Sure. So the missing scp phandle case is maintained exclusively for
backwards-compatibility. And we're ok that the old DTs will keep getting the
error.

I'll send a v2 adding the phandle in the DT instead.

Thanks,
Nícolas