All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Michał Kopeć" <michal@nozomi.space>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 3/4] pmdomain: mediatek: mt8188: Enable the GPU timestamp counter
Date: Sun, 11 Oct 2026 18:57:43 +0000	[thread overview]
Message-ID: <sashiko-outbox-167389@kernel.org> (raw)
In-Reply-To: <20261011184755.2058017-4-michal@nozomi.space>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] dt-bindings: ABI breakage for MT8188 older kernels via access-controllers
--

commit 67ac5bbd1956b4f1ebf5fa4f2f96f5fd7b231689
Author: Michał Kopeć <michal@nozomi.space>

pmdomain: mediatek: mt8188: Enable the GPU timestamp counter

This commit adds MFGCFG as a second MT8188 access controller to maintain the
GPU timestamp counter. The counter loses its SoC system timer configuration
when the MFG1 power domain is turned off. Setting these bits when MFG1 is
powered on fixes always-zero timestamps for GPU jobs.

> diff --git a/drivers/pmdomain/mediatek/mt8188-pm-domains.h b/drivers/pmdomain/mediatek/mt8188-pm-domains.h
> index 3a989e83e9b79..88035cc6a808b 100644
> --- a/drivers/pmdomain/mediatek/mt8188-pm-domains.h
> +++ b/drivers/pmdomain/mediatek/mt8188-pm-domains.h
> @@ -14,8 +14,21 @@
>   * MT8188 power domain support
>   */
>  
> +#define MT8188_MFG_TIMESTAMP			0x130
> +#define MT8188_MFG_TIMESTAMP_EN			GENMASK(1, 0)
> +
>  static enum scpsys_bus_prot_block scpsys_bus_prot_blocks_mt8188[] = {
> -	BUS_PROT_BLOCK_INFRA
> +	BUS_PROT_BLOCK_INFRA, BUS_PROT_BLOCK_MFGCFG
>  };

[Severity: High]
Can adding a second bus protection block cause a regression on older kernels?

Older kernels hardcode soc->num_bus_prot_blocks to 1 for MT8188. If they boot
with an updated device tree containing two access-controllers handles,
scpsys_get_bus_protection() will fail because of its strict equality check:

drivers/pmdomain/mediatek/mtk-pm-domains.c:scpsys_get_bus_protection() {
    ...
    num_handles = of_count_phandle_with_args(np, "access-controllers", NULL);
    if (num_handles < 0 || num_handles != soc->num_bus_prot_blocks)
        return dev_err_probe(dev, -EINVAL,
                             "Cannot get access controllers: expected %u, got %d\n",
                             soc->num_bus_prot_blocks, num_handles);
    ...
}

Will this strict check return -EINVAL and prevent power domain initialization
entirely?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261011184755.2058017-1-michal@nozomi.space?part=3

  reply	other threads:[~2026-10-11 18:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-11 18:47 [PATCH v2 0/4] pmdomain: mediatek: Enable the GPU timestamp counter on MT8188 Michał Kopeć
2026-10-11 18:47 ` [PATCH v2 1/4] dt-bindings: power: mediatek: Add the MT8188 access controllers Michał Kopeć
2026-10-11 18:47 ` [PATCH v2 2/4] pmdomain: mediatek: Restore a register after powering a domain on Michał Kopeć
2026-10-11 18:55   ` sashiko-bot
2026-10-11 18:47 ` [PATCH v2 3/4] pmdomain: mediatek: mt8188: Enable the GPU timestamp counter Michał Kopeć
2026-10-11 18:57   ` sashiko-bot [this message]
2026-10-11 18:47 ` [PATCH v2 4/4] arm64: dts: mediatek: mt8188: Use access-controllers in the power controller Michał Kopeć

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=sashiko-outbox-167389@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=michal@nozomi.space \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.