linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: Abel Vesa <abel.vesa@linaro.org>
Cc: Peng Fan <peng.fan@nxp.com>, Lucas Stach <l.stach@pengutronix.de>,
	"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>,
	Abel Vesa <abel.vesa@nxp.com>, Fabio Estevam <festevam@gmail.com>,
	Jacky Bai <ping.bai@nxp.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Shawn Guo <shawnguo@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH v3 3/6] clk: imx: imx8mp: Add audiomix block control
Date: Thu, 11 Aug 2022 18:38:49 +0200	[thread overview]
Message-ID: <9e56dc70-e489-7288-784c-289da9325ed1@denx.de> (raw)
In-Reply-To: <YvUaKPkv3jWFVeAL@linaro.org>

On 8/11/22 17:03, Abel Vesa wrote:
> On 22-08-11 16:30:20, Marek Vasut wrote:
>> On 8/11/22 16:20, Abel Vesa wrote:
>>> On 22-08-04 11:31:33, Marek Vasut wrote:
>>>> On 8/4/22 11:13, Peng Fan wrote:
>>>>>> Subject: Re: [PATCH v3 3/6] clk: imx: imx8mp: Add audiomix block control
>>>>>>
>>>>>> On 6/28/22 09:44, Abel Vesa wrote:
>>>>>>> On 22-06-27 18:23:33, Marek Vasut wrote:
>>>>>>>> On 6/27/22 17:35, Abel Vesa wrote:
>>>>>>>>> On 22-06-25 03:32:32, Marek Vasut wrote:
>>>>>>>>>> Unlike the other block control IPs in i.MX8M, the audiomix is
>>>>>>>>>> mostly a series of clock gates and muxes. Model it as a large
>>>>>>>>>> static table of gates and muxes with one exception, which is the
>>>>>>>>>> PLL14xx . The PLL14xx SAI PLL has to be registered separately.
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Again, there is a chance that the blk-ctrl driver might disable the
>>>>>>>>> PD from under this.
>>>>>>>>
>>>>>>>> Can you elaborate a bit more on this ? How/why do you think so ?
>>>>>>>
>>>>>>> At some point, the PDs from the Audiomix IP block will be added to the
>>>>>>> drivers/soc/imx/imx8mp-blk-ctrl.c. Then, you'll have 2 drivers with
>>>>>>> the same address range and the imx8mp-blk-ctrl also has runtime PM
>>>>>> enabled.
>>>>>>
>>>>>> Why would the PDs be added into the block control driver?
>>>>>>
>>>>>> The audiomix is purely a clock mux driver, not really a block control driver
>>>>>> providing PDs of its own.
>>>>>
>>>>> I recalled that with with blk-ctrl working as clock provider, there is dead lock
>>>>> issue, if the blk-ctrl node has a power-domain entry. Not very sure.
>>>>
>>>> How can I verify that ? Lockdep ?
>>>>
>>>> I run this series for months and haven't seen a lock up or splat.
>>>
>>> Audiomix (and every mix actually) has a PD. Once you add the PD, you'll
>>> end up with an ABBA deadlock between genpd lock and clock prepare lock.
>>
>> Unlike the other mix drivers, this is a pure clock driver, not a power
>> domain driver. The PD is already available to this clock driver, see:
>> [PATCH v3 5/6] arm64: dts: imx8mp: Add SAI, SDMA, AudioMIX
> 
> When you will enable the runtime PM for this driver, the deadlock is
> going to happen and it will be in some scenario like:
>      clk_disable_unused_subtree
>        -> clk_prepare (takes prepare lock) (for a clock from your driver)
> 	-> runtime pm (takes genpd lock)
> 	  -> clk_prepare (tries to take prepare lock again) (for the clock of the PD)

Since you seem to have a test case, can you share the test case, 
verbatim, so I can reproduce it locally ?

I seem to be asking for that repeatedly and I am not getting any clear 
answer.

>> Can you please elaborate on the deadlock problem ?
>> Because really, I just don't see it.
>>
>> Were you able to reproduce the deadlock with this driver ?

[...]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2022-08-11 16:40 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-25  1:32 [PATCH v3 1/6] clk: Introduce devm_clk_hw_register_mux_parent_data() Marek Vasut
2022-06-25  1:32 ` [PATCH v3 2/6] clk: Introduce devm_clk_hw_register_gate_parent_data() Marek Vasut
2022-06-25  1:32 ` [PATCH v3 3/6] clk: imx: imx8mp: Add audiomix block control Marek Vasut
2022-06-27 15:35   ` Abel Vesa
2022-06-27 16:23     ` Marek Vasut
2022-06-28  7:44       ` Abel Vesa
2022-06-28 17:06         ` Marek Vasut
2022-06-29  7:41           ` Abel Vesa
2022-08-04  9:13           ` Peng Fan
2022-08-04  9:31             ` Marek Vasut
2022-08-11 14:20               ` Abel Vesa
2022-08-11 14:30                 ` Marek Vasut
2022-08-11 15:03                   ` Abel Vesa
2022-08-11 15:14                     ` Abel Vesa
2022-08-11 16:38                     ` Marek Vasut [this message]
2022-08-11 16:51                       ` Abel Vesa
2022-06-29  7:43   ` Abel Vesa
     [not found]   ` <CAA+D8ANLrPML3Hp3fYyfiSSUs9V6xAu55d4Y2-8cVVAuTNwaMw@mail.gmail.com>
2022-10-19 14:33     ` Marek Vasut
     [not found]       ` <CAA+D8ANdOQaz05_SCmTgEW_bCS4ABBLgMzXese_3WWiF8WxzqA@mail.gmail.com>
2022-10-25 21:10         ` Marek Vasut
     [not found]           ` <CAA+D8AO3KZr9uxS-T1LXK568EeE-wf8yxGCYiayBBxFKDF_HZQ@mail.gmail.com>
2022-10-26 11:03             ` Marek Vasut
2023-02-22 16:58   ` Luca Ceresoli
2022-06-25  1:32 ` [PATCH v3 4/6] dt-bindings: clock: " Marek Vasut
2022-06-25  1:32 ` [PATCH v3 5/6] arm64: dts: imx8mp: Add SAI, SDMA, AudioMIX Marek Vasut
2023-02-22 16:59   ` Luca Ceresoli
2022-06-25  1:32 ` [PATCH v3 6/6] arm64: dts: imx8mp: Add analog audio output on i.MX8MP EVK Marek Vasut
2023-02-22 17:22   ` Luca Ceresoli
2023-02-22 17:25     ` [PATCH] arm64: dts: imx8mp-msc-sm2s: Add sound card Luca Ceresoli
2023-02-22 17:59       ` Marco Felsch
2023-02-22 18:39         ` Marek Vasut
2023-02-22 19:02           ` Marco Felsch
2023-02-23 16:23             ` Marek Vasut
2023-02-24 12:56               ` Marco Felsch
2023-02-22 19:57         ` Luca Ceresoli
2023-02-22 18:20       ` Krzysztof Kozlowski
2023-02-23  7:30       ` kernel test robot
2023-02-23 16:24     ` [PATCH v3 6/6] arm64: dts: imx8mp: Add analog audio output on i.MX8MP EVK Marek Vasut
2023-02-24 16:16       ` Luca Ceresoli
2022-10-10  6:20 ` [PATCH v3 3/6] clk: imx: imx8mp: Add audiomix block control Shengjiu Wang
2022-11-21  8:17 ` [PATCH v3 1/6] clk: Introduce devm_clk_hw_register_mux_parent_data() Richard Leitner
2022-11-26 15:23   ` Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e56dc70-e489-7288-784c-289da9325ed1@denx.de \
    --to=marex@denx.de \
    --cc=abel.vesa@linaro.org \
    --cc=abel.vesa@nxp.com \
    --cc=festevam@gmail.com \
    --cc=l.stach@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=mturquette@baylibre.com \
    --cc=peng.fan@nxp.com \
    --cc=ping.bai@nxp.com \
    --cc=sboyd@kernel.org \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).