All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@collabora.com>
To: Liviu Dudau <liviu.dudau@arm.com>
Cc: "Nicolas Frattaroli" <nicolas.frattaroli@collabora.com>,
	"Adam Ford" <aford173@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Onur Özkan" <work@onurozkan.dev>,
	"Steven Price" <steven.price@arm.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Mark Brown" <broonie@kernel.org>
Subject: Re: [PATCH v1 2/2] drm/panthor: treat sram as mandatory except mt8196
Date: Mon, 16 Feb 2026 15:20:30 +0100	[thread overview]
Message-ID: <20260216152030.5f91104e@fedora> (raw)
In-Reply-To: <aZMiv7ARO4TUSUTa@e142607>

Hi Liviu,

On Mon, 16 Feb 2026 13:59:27 +0000
Liviu Dudau <liviu.dudau@arm.com> wrote:

> On Mon, Feb 16, 2026 at 01:43:19PM +0100, Nicolas Frattaroli wrote:
> > On Monday, 16 February 2026 12:44:39 Central European Standard Time AngeloGioacchino Del Regno wrote:  
> > > Il 16/02/26 10:44, Boris Brezillon ha scritto:  
> > > > Hello Adam,
> > > > 
> > > > On Sun, 15 Feb 2026 16:21:34 -0600
> > > > Adam Ford <aford173@gmail.com> wrote:
> > > >   
> > > >> On Sun, Feb 15, 2026 at 4:04 AM Onur Özkan <work@onurozkan.dev> wrote:  
> > > >>>
> > > >>> If sram-supply is missing, Panthor falls back to a
> > > >>> dummy regulator with a warning. This implicit behavior
> > > >>> hides missing DT wiring behind regulator core fallback.  
> > 
> > This is intentional design of the regulator API. A missing supply will
> > always result in a dummy regulator. The _optional function bubbles the
> > missing supply condition up to the caller.
> > 
> > Catching device trees lacking supplies that are marked as required by
> > the binding is done with dtbs_check, not at runtime.  
> 
> I'm replying to this thread while I'm also trying to cover some discussion in the
> DT patch series.
> 
> What we're trying to solve is this: the Mali GPUs have an L2$+bits power domain
> that in upstream ended up being called 'sram' for reasons. The domain is important
> both for ultimate power savings (you can turn off most of the other GPU domains
> and preserve enough state for the GPU to wake up on an interrupt) and for normal
> operations, for obvious reasons. Now, vendors either don't bother to put a
> separate domain just for "sram" or go to the extreme of handing over control over
> that domain to an MCU that implements aggresive and system-wide policies. We're
> trying to cater for all cases, include the (currently hypotetical) one where you
> have a separate "sram" power domain that Linux can control.
> 
> When we have first upstreamed the bindings, inspired by Panfrost driver, we have
> added the sram-supply as mandatory which I think is turning out to be a mistake.
> Prompted by Mark Brown's reply[1] to Tyr adding 'sram-supply' as an optional
> property, Onur has started this and the DT patch series[2] to enforce the presence
> of an 'sram-supply' to reduce the number of warnings in dtbs_check. In reality
> what we are enforcing is a dummy supply that is the same as the one the GPU is using
> because most of the systems don't have a specific one.
> 
> So the problem we have is: do we change the upstream binding and make 'sram-supply'
> optional for every compatible string given that it is unlikely to be provided (and
> the code did not enforce it in panthor_devfreq.c anyway from the beginning), or
> do we accept that this power domain is important but usually not specified and we
> go with the current DT patch series that provides one?

My main worry with this approach is that SoC/board bring-up tends to be
an iterative process in practice, and it usually starts with a
bunch of resources forcibly enabled (either in the bootloader
or directly in Linux) because that's easy. Problem is, that's also very
easy to forget defining non-optional resources when the dts[i] is
upstreamed, because everything seems to work just fine. And because of
this DT backward-compat constraint, if get it wrong, and the supply is
needed for real, when we get to implement the real thing we're just
screwed. Having a runtime error preventing the device to probe forces
people to at least think twice before doing something stupid, like
making the SRAM (or L2-cache) supply point to the core supply when they
are two distinct regulator outputs.

Regards,

Boris


  reply	other threads:[~2026-02-16 14:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-15 10:02 [PATCH v1 1/2] arm64: dts: add missing sram-supply to mali gpu nodes Onur Özkan
2026-02-15 10:02 ` Onur Özkan
2026-02-15 10:02 ` [PATCH v1 2/2] drm/panthor: treat sram as mandatory except mt8196 Onur Özkan
2026-02-15 22:21   ` Adam Ford
2026-02-16  9:44     ` Boris Brezillon
2026-02-16 11:44       ` AngeloGioacchino Del Regno
2026-02-16 12:43         ` Nicolas Frattaroli
2026-02-16 13:59           ` Liviu Dudau
2026-02-16 14:20             ` Boris Brezillon [this message]
2026-02-16 14:06           ` Boris Brezillon
2026-02-16  9:37   ` Boris Brezillon
2026-02-16 14:41     ` Onur Özkan
2026-02-16 15:20       ` Steven Price
2026-02-15 10:27 ` [PATCH v1 1/2] arm64: dts: add missing sram-supply to mali gpu nodes Krzysztof Kozlowski
2026-02-15 10:27   ` Krzysztof Kozlowski
2026-02-16 11:33 ` AngeloGioacchino Del Regno
2026-02-16 11:33   ` AngeloGioacchino Del Regno
2026-02-24 11:19 ` Chen-Yu Tsai
2026-02-24 11:19   ` Chen-Yu Tsai

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=20260216152030.5f91104e@fedora \
    --to=boris.brezillon@collabora.com \
    --cc=aford173@gmail.com \
    --cc=airlied@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=broonie@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=liviu.dudau@arm.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mripard@kernel.org \
    --cc=nicolas.frattaroli@collabora.com \
    --cc=simona@ffwll.ch \
    --cc=steven.price@arm.com \
    --cc=tzimmermann@suse.de \
    --cc=work@onurozkan.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.