All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: Simon Glass <sjg@chromium.org>,  Tom Rini <trini@konsulko.com>,
	 Jaehoon Chung <jh80.chung@samsung.com>,
	 Lukasz Majewski <lukma@denx.de>,
	 Sean Anderson <seanga2@gmail.com>,
	 Anatolij Gustschin <agust@denx.de>,  Peng Fan <peng.fan@nxp.com>,
	 Mario Six <mario.six@gdsys.cc>,
	 Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	 u-boot@lists.denx.de,  Ian Ray <ian.ray@gehealthcare.com>,
	 Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
	 Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	 Adam Ford <aford173@gmail.com>, Marek Vasut <marex@denx.de>
Subject: Re: [PATCH v4 05/12] power-domain: Add refcounting
Date: Mon, 03 Mar 2025 09:43:24 +0100	[thread overview]
Message-ID: <87y0xma4ib.fsf@bootlin.com> (raw)
In-Reply-To: <CAOMZO5BwB75QnfYKkcnq_kS_7N8yXzLNdpyzcWQ2Jy3zu9V1NQ@mail.gmail.com> (Fabio Estevam's message of "Sat, 8 Feb 2025 08:09:30 -0300")

Hello Simon,

On 08/02/2025 at 08:09:30 -03, Fabio Estevam <festevam@gmail.com> wrote:

> Hi Simon,
>
> On Wed, Jan 29, 2025 at 7:22 AM Miquel Raynal <miquel.raynal@bootlin.com> wrote:
>>
>> It is very surprising that such an uclass, specifically designed to
>> handle resources that may be shared by different devices, is not keeping
>> the count of the number of times a power domain has been
>> enabled/disabled to avoid shutting it down unexpectedly or disabling it
>> several times.
>>
>> Doing this causes troubles on eg. i.MX8MP because disabling power
>> domains can be done in recursive loops were the same power domain
>> disabled up to 4 times in a row. PGCs seem to have tight FSM internal
>> timings to respect and it is easy to produce a race condition that puts
>> the power domains in an unstable state, leading to ADB400 errors and
>> later crashes in Linux.
>>
>> CI tests using power domains are slightly updated to make sure the count
>> of on/off calls is even and the results match what we *now* expect.
>>
>> As we do not want to break existing users while stile getting
>> interesting error codes, the implementation is split between:
>> - a low-level helper reporting error codes if the requested transition
>>   could not be operated,
>> - a higher-level helper ignoring the "non error" codes, like EALREADY and
>>   EBUSY.
>>
>> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
>
> Are you happy with this version?

Would you have any feedback on this? I believe we agreed on the
implementation but it's been a month and I didn't heard back from you
since then, and I believe Fabio was waiting for your feedback.

Thanks a lot,
Miquèl

  reply	other threads:[~2025-03-03  8:43 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-29 10:21 [PATCH v4 00/12] Add imx8mp video support Miquel Raynal
2025-01-29 10:21 ` [PATCH v4 01/12] dm: doc: Fix example Miquel Raynal
2025-01-29 10:21 ` [PATCH v4 02/12] dm: core: Add a helper to retrieve devices through graph endpoints Miquel Raynal
2025-01-29 10:21 ` [PATCH v4 03/12] sandbox: Add a fake DSI controller and link it to the panel Miquel Raynal
2025-01-29 10:21 ` [PATCH v4 04/12] test: dm: test-fdt: Add checks for uclass_get_device_by_endpoint() Miquel Raynal
2025-01-29 10:21 ` [PATCH v4 05/12] power-domain: Add refcounting Miquel Raynal
2025-02-08 11:09   ` Fabio Estevam
2025-03-03  8:43     ` Miquel Raynal [this message]
2025-03-04 13:13       ` Simon Glass
2025-03-04 13:55         ` Miquel Raynal
2025-01-29 10:22 ` [PATCH v4 06/12] clk: Ensure the parent clocks are enabled while reparenting Miquel Raynal
2025-01-29 10:22 ` [PATCH v4 07/12] clk: imx8mp: Add media related clocks Miquel Raynal
2025-01-29 10:22 ` [PATCH v4 08/12] imx: power-domain: Describe the i.MX8 MEDIAMIX domain Miquel Raynal
2025-01-29 10:22 ` [PATCH v4 09/12] imx: power-domain: Add support for the MEDIAMIX control block Miquel Raynal
2025-01-29 10:22 ` [PATCH v4 10/12] video: imx: Fix Makefile in order to be able to add other imx drivers Miquel Raynal
2025-01-29 10:22 ` [PATCH v4 11/12] video: imx: Add LDB driver Miquel Raynal
2025-01-29 10:22 ` [PATCH v4 12/12] video: imx: Add LCDIF driver Miquel Raynal
2025-03-03 12:31 ` [PATCH v4 00/12] Add imx8mp video support Fabio Estevam
2025-03-03 17:06   ` Tom Rini
2025-03-03 17:14     ` Svyatoslav Ryhel
2025-03-13 18:26       ` Fabio Estevam
2025-03-26 15:01         ` Miquel Raynal
2025-03-27 13:31           ` Fabio Estevam
2025-03-27 14:14             ` Tom Rini
2025-03-28  8:39               ` Miquel Raynal
2025-03-28 15:57                 ` Tom Rini
2025-03-28 16:31                   ` Miquel Raynal
2025-04-03  7:30                   ` Miquel Raynal
2025-03-03 17:18     ` Svyatoslav Ryhel
2025-03-05 18:12     ` Fabio Estevam
2025-03-05 18:17       ` Tom Rini
2025-03-06 12:38         ` Fabio Estevam
2025-03-06 12:51           ` Miquel Raynal
2025-03-06 13:00             ` Fabio Estevam
2025-03-06 14:05               ` Tom Rini

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=87y0xma4ib.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=aford173@gmail.com \
    --cc=agust@denx.de \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=festevam@gmail.com \
    --cc=ian.ray@gehealthcare.com \
    --cc=jh80.chung@samsung.com \
    --cc=lukma@denx.de \
    --cc=marex@denx.de \
    --cc=mario.six@gdsys.cc \
    --cc=michael@amarulasolutions.com \
    --cc=peng.fan@nxp.com \
    --cc=seanga2@gmail.com \
    --cc=sjg@chromium.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.