[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a2f7e2c3-f072-40f7-a865-5693b82b636e@sirena.org.uk>
Date: Thu, 9 Jan 2025 20:11:12 +0000
From: Mark Brown <broonie@...nel.org>
To: Sander Vanheule <sander@...nheule.net>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] regmap: add cache validity to REGCACHE_FLAT
On Thu, Jan 09, 2025 at 07:02:55PM +0100, Sander Vanheule wrote:
> The flat regcache will always assume the data in the cache is valid.
> Since the cache takes priority over hardware values, this may shadow the
> actual state of the device. This is not the case with REGCACHE_RBTREE
> for example, which makes these implementation behave differently.
This is causing spurious events to be generated by the audio drivers on
Pine64 Plus, the audio drivers for that do use the flat cache (see
sound/soc/sunxi):
https://lava.sirena.org.uk/scheduler/job/1056879#L1897
I haven't investigated yet but I suspect this is going to have been
triggered by the change from assuming all registers default to 0 if not
otherwise specified to reading back from the hardware if the first
access is a read. That does seem a bit like a driver bug (I'm not clear
on the precise mechanism apart from anything else) but I worry that
it'll be a widespread one where things do read/modify/write cycles.
There may also be initialisation from suspend issues where we stop
resetting values after resume. We do need a plan for this, possibly we
should default to the old behaviour.
It's definitely too late in the release cycle to apply the change in any
case.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists