lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEnQRZAHTjKVZwviNnXSwMEn1f6PN1fV2==3xeG9kZ462ryYhw@mail.gmail.com>
Date:   Wed, 13 Mar 2019 13:29:10 +0200
From:   Daniel Baluta <daniel.baluta@...il.com>
To:     Sascha Hauer <s.hauer@...gutronix.de>
Cc:     Abel Vesa <abel.vesa@....com>,
        Michael Turquette <mturquette@...libre.com>,
        Stephen Boyd <sboyd@...nel.org>,
        Sascha Hauer <kernel@...gutronix.de>,
        Lucas Stach <l.stach@...gutronix.de>,
        Shawn Guo <shawnguo@...nel.org>,
        Aisheng Dong <aisheng.dong@....com>,
        Jacky Bai <ping.bai@....com>,
        Anson Huang <anson.huang@....com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        dl-linux-imx <linux-imx@....com>,
        Fabio Estevam <fabio.estevam@....com>,
        "linux-clk@...r.kernel.org" <linux-clk@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "S.j. Wang" <shengjiu.wang@....com>
Subject: Re: [RFC] clk: imx: Allow re-parenting by default on set rate

On Wed, Mar 13, 2019 at 12:42 PM Sascha Hauer <s.hauer@...gutronix.de> wrote:
>
> On Mon, Mar 11, 2019 at 10:41:40AM +0000, Abel Vesa wrote:
> > On 19-03-11 11:28:25, Sascha Hauer wrote:
> > > Hi Abel,
> > >
> > > On Thu, Mar 07, 2019 at 09:20:37AM +0000, Abel Vesa wrote:
> > > > By default, the muxes should re-parent on set_rate.
> > > > This would allow the drivers to control only the leaf clock node,
> > > > leaving the rest to the clock driver, that way simplifying the
> > > > clock control.
> > >
> > > I am afraid of this change. Besides the rate there might be other
> > > reasons to choose one mux input over another, consider for example low
> > > power audio playback where we need one specific mux setting because it
> > > provides a clock which runs at low power mode.
> > > On the IPU on i.MX5/6 there are clocks being used as pixel clocks
> > > derived from different muxes. I don't think you want to pick an input
> > > clock just because it happens to deliver the best clock rate at that
> > > point in time, but really is shared with some other clock that changes
> > > its rate in the next moment.
> > >
> >
> > > I have no concrete examples for things that break with this change, but
> > > I would be more confident if we change the behaviour explicitly only for
> > > the muxes that we have reviewed to cope with this change.
> > >
> >
> > Fair enough. We could replace all the imx_clk_mux with imx_clk_mux_noreparent
> > and after that we can independently switch the clocks that are safe (to switch)
> > to imx_clk_mux (which would not have the noreparent flag set).
>
> Ok with me.
>
> >
> > The main idea is to simplify the clock control from drivers point of view.
>
> Which drivers do you have in mind? I hardly ever missed reparenting on
> rate changes, so where is this feature useful?

Hi Sascha,

Reparenting is very useful for Audio IPs (SAI, SPDIF, PDM, FSL DSP).
We often need clock rates that are multiples of 8000 or 11025
which can be obtain from different PLLs. But in order for this to work
we need to have the correct parent.

In our current tree we do the re parenting manually inside drivers. For example:

https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/fsl/fsl_sai.c?h=imx_4.14.78_1.0.0_ga#n244

This is far from optimal. Abel's patch will be of a great help for Audio.

thanks,
Daniel.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ