[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c2c2f613-3b65-4efe-99c2-135f043b2d3b@samsung.com>
Date: Wed, 29 Jan 2025 18:50:57 +0100
From: Marek Szyprowski <m.szyprowski@...sung.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org, Greg
Kroah-Hartman <gregkh@...uxfoundation.org>, "Rafael J. Wysocki"
<rafael@...nel.org>, Danilo Krummrich <dakr@...nel.org>, Dmitry Baryshkov
<dmitry.baryshkov@...aro.org>, DRI mailing list
<dri-devel@...ts.freedesktop.org>
Subject: Re: [PATCH v3 1/1] regmap: Synchronize cache for the page selector
On 29.01.2025 16:07, Andy Shevchenko wrote:
>> [...]
> Meanwhile, can you test this patch (on top of non-working case)?
>
> diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
> index 2314744201b4..f799a7a80231 100644
> --- a/drivers/base/regmap/regmap.c
> +++ b/drivers/base/regmap/regmap.c
> @@ -1553,8 +1553,19 @@ static int _regmap_select_page(struct regmap *map, unsigned int *reg,
> * virtual copy as well.
> */
> if (page_chg &&
> - in_range(range->selector_reg, range->window_start, range->window_len))
> + in_range(range->selector_reg, range->window_start, range->window_len)) {
> + bool bypass, cache_only;
> +
> + bypass = map->cache_bypass;
> + cache_only = map->cache_only;
> + map->cache_bypass = false;
> + map->cache_only = true;
> +
> _regmap_update_bits(map, sel_register, mask, val, NULL, false);
> +
> + map->cache_bypass = bypass;
> + map->cache_only = cache_only;
> + }
> }
>
> *reg = range->window_start + win_offset;
>
> If I understood the case, the affected driver doesn't use case and we actually
> write to the selector register twice which most likely messes up the things.
> But this is only a theory (since we don't have the traces yet).
Bingo! This patch (on top of current linux-next) fixed the probe issue.
Feel free to add:
Reported-by: Marek Szyprowski <m.szyprowski@...sung.com>
Tested-by: Marek Szyprowski <m.szyprowski@...sung.com>
(although I'm not sure if this is a fix for the generic case or just
this driver)
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
Powered by blists - more mailing lists