public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Florent Tomasin <florent.tomasin@arm.com>
To: Chia-I Wu <olvaffe@gmail.com>,
	Boris Brezillon <boris.brezillon@collabora.com>
Cc: Steven Price <steven.price@arm.com>,
	Liviu Dudau <liviu.dudau@arm.com>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org
Subject: Re: [RFC PATCH 2/2] drm/panthor: add initial mt8196 support
Date: Fri, 5 Sep 2025 10:18:01 +0100	[thread overview]
Message-ID: <39d3363d-dd49-43a3-b42e-a434ab6c347e@arm.com> (raw)
In-Reply-To: <CAPaKu7RdpEtwqDHrjt4HJOJVYeRjUa38Sk70=6dD9WmXYtf_jw@mail.gmail.com>



On 05/09/2025 00:06, Chia-I Wu wrote:
> On Wed, Sep 3, 2025 at 11:02 PM Boris Brezillon
> <boris.brezillon@collabora.com> wrote:
>>
>> On Wed,  3 Sep 2025 15:55:04 -0700
>> Chia-I Wu <olvaffe@gmail.com> wrote:
>>
>>> diff --git a/drivers/gpu/drm/panthor/Makefile b/drivers/gpu/drm/panthor/Makefile
>>> index 02db21748c125..75e92c461304b 100644
>>> --- a/drivers/gpu/drm/panthor/Makefile
>>> +++ b/drivers/gpu/drm/panthor/Makefile
>>> @@ -12,4 +12,6 @@ panthor-y := \
>>>       panthor_mmu.o \
>>>       panthor_sched.o
>>>
>>> +panthor-$(CONFIG_DRM_PANTHOR_SOC_MT8196) += panthor_soc_mt8196.o
>>
>> Based on the stuff you describe (ASN hash, core mask read from an nvmem
>> cell, extra clks/regulators?), I don't think we need per-soc source
>> files and per-soc config options. If it becomes too HW specific (no
>> abstraction to make it SoC-agnostic), we can reconsider the per-SoC
>> file approach, but I believe it can all live in panthor_drv.c for now.
> That's about right except no extra clk/regulator is needed.
> 
> gpueb on mt8196 is yet another mcu running on its own fw.  It can
> provide clk/regulator to panthor and no change is needed from panthor.
> But it can also do dvfs autonomously, in which case panthor needs to
> be modified to make clk/regulator/devfreq optional.  I think the
> latter is where Nicolas Frattaroli is going and requires more invasive
> integration.

Hi Chia-I Wu,

I beleive the changes your are proposing need to be treated as 3
different features:

1. Handling of ASN hash
2. clk/regulator registration
3. Core Mask control in Panthor

* For 1. since it is a GPU HW property, have you considered
handling it in the DTB as HW quirk?

Pass the value of the register from the DTB, then Panthor
driver applies a mask to filter the bits and then configre the HW regs

> The clk/regulator provider on MT8196 is GPUEB, whose driver[1] needs to
> be cleaned up and upstreamed separately.

* For 2. Have you considered making the GPUEB MTK driver act as
a clock/regulator supplier?

Without a clocks, the driver won't be able to support
instrumenation.

And without a regulator or clock, how will system/runtime PM
suspend/resume be handled in the driver?

* For 3. I think this is a more complex topic and other vendors may
have different needs.

At first glance, `panthor_soc_data` does not seem to be sufficient
to cope with other vendors.

What would be the protocole used to communicate wth MCU?
Can the MCU update the core mask on its own?
Will the core mask change at runtime?

If the core mask is static, what about adding a DTB entry?

Kind regards,
Florent

  reply	other threads:[~2025-09-05  9:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03 22:55 [RFC PATCH 0/2] drm/panthor: initial mt8196 support Chia-I Wu
2025-09-03 22:55 ` [RFC PATCH 1/2] dt-bindings: gpu: mali-valhall-csf: add MediaTek MT8196 compatible Chia-I Wu
2025-09-04  9:30   ` Krzysztof Kozlowski
2025-09-04 20:31     ` Chia-I Wu
2025-09-03 22:55 ` [RFC PATCH 2/2] drm/panthor: add initial mt8196 support Chia-I Wu
2025-09-04  6:02   ` Boris Brezillon
2025-09-04 23:06     ` Chia-I Wu
2025-09-05  9:18       ` Florent Tomasin [this message]
2025-09-05 17:02         ` Chia-I Wu
2025-09-04 11:20 ` [RFC PATCH 0/2] drm/panthor: " Nicolas Frattaroli
2025-09-04 23:18   ` Chia-I Wu
2025-09-05  3:08   ` 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=39d3363d-dd49-43a3-b42e-a434ab6c347e@arm.com \
    --to=florent.tomasin@arm.com \
    --cc=airlied@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=boris.brezillon@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.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=olvaffe@gmail.com \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=steven.price@arm.com \
    --cc=tzimmermann@suse.de \
    /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