mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mark Brown <broonie@kernel.org>,
	linux-kernel@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	DRI mailing list <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v3 1/1] regmap: Synchronize cache for the page selector
Date: Wed, 29 Jan 2025 18:50:57 +0100	[thread overview]
Message-ID: <c2c2f613-3b65-4efe-99c2-135f043b2d3b@samsung.com> (raw)
In-Reply-To: <Z5pESDSekep9ChAN@smile.fi.intel.com>

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@samsung.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.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


  reply	other threads:[~2025-01-29 17:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 12:42 Andy Shevchenko
2025-01-16 19:14 ` Mark Brown
     [not found] ` <CGME20250117135754eucas1p1a8558792f9475c2acc009e1ba20c7109@eucas1p1.samsung.com>
2025-01-17 13:57   ` Marek Szyprowski
2025-01-17 14:09     ` Andy Shevchenko
2025-01-17 14:30       ` Andy Shevchenko
2025-01-17 15:50         ` Mark Brown
2025-01-17 16:05         ` Marek Szyprowski
2025-01-17 17:28           ` Andy Shevchenko
2025-01-21  7:33             ` Marek Szyprowski
2025-01-21 13:29               ` Andy Shevchenko
2025-01-28 16:08                 ` Marek Szyprowski
2025-01-28 16:43                   ` Andy Shevchenko
2025-01-29 15:07                     ` Andy Shevchenko
2025-01-29 17:50                       ` Marek Szyprowski [this message]
2025-01-29 21:19                         ` Mark Brown
2025-01-30  8:21                         ` Andy Shevchenko
2025-02-01 17:18                       ` Dmitry Baryshkov
2025-02-03  9:19                         ` Andy Shevchenko
2025-02-03 12:45                           ` Mark Brown
2025-02-03 13:07                             ` Andy Shevchenko
2025-01-17 15:58       ` Marek Szyprowski

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=c2c2f613-3b65-4efe-99c2-135f043b2d3b@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=dakr@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@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

all inboxes | Powered by JetHome®