From: Karunika Choo <karunika.choo@arm.com>
To: Boris Brezillon <boris.brezillon@collabora.com>
Cc: dri-devel@lists.freedesktop.org, nd@arm.com,
Steven Price <steven.price@arm.com>,
Liviu Dudau <liviu.dudau@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>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 08/18] drm/panthor: Skip devfreq when no OPP table is present
Date: Mon, 8 Jun 2026 15:39:56 +0100 [thread overview]
Message-ID: <e3c32d54-b85b-4ad8-bd6d-120c4dbfead1@arm.com> (raw)
In-Reply-To: <20260608160822.1038d08e@fedora-2.home>
On 08/06/2026 15:08, Boris Brezillon wrote:
> On Thu, 28 May 2026 16:05:36 +0100
> Karunika Choo <karunika.choo@arm.com> wrote:
>
>> On Mali v15 AM systems, frequency scaling is handled outside panthor by
>> the AM_GOVERNOR block, so the GPU DT node may not provide an OPP table.
>
> OOC, is this still handled as clock frequency changes? I'm asking
> because the recent perfcnt work requires registering clk notifiers to
> get an approximation of the number of shader/top-level/coregroup clock
> cycles on a given period of time so we an calculate relative GPU
> utilization, and so far we've only considered clk notifiers as a way to
> get informed of these frequency changes.
>
> BTW, this is already problematic for the mediatek GPUEB design, where
> devfreq stuff is delegated to an MCU, and we don't currently have a way
> to get notified when this MCU changes the frequencies.
>
I believe we should still support initializing clocks and registering
notifiers for them. We are just disabling the devfreq subsystem in
this patch.
Would mediatek be able to expose a child clock or logical clock from
ther GPUEB driver to Panthor so that we can get these notifications?
Kind regards,
Karunika Choo
>>
>> Make panthor_devfreq_init() return early when operating-points-v2 is
>> absent, and guard the devfreq helper paths against a missing devfreq
>> instance.
>>
>> This keeps devfreq enabled for existing platforms while allowing v15 AM
>> systems to probe without a local devfreq setup.
>>
>> Signed-off-by: Karunika Choo <karunika.choo@arm.com>
>
> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
>
>> ---
>> drivers/gpu/drm/panthor/panthor_devfreq.c | 13 ++++++++-----
>> 1 file changed, 8 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/panthor/panthor_devfreq.c b/drivers/gpu/drm/panthor/panthor_devfreq.c
>> index 2249b41ca4af..c3252ce54437 100644
>> --- a/drivers/gpu/drm/panthor/panthor_devfreq.c
>> +++ b/drivers/gpu/drm/panthor/panthor_devfreq.c
>> @@ -148,6 +148,9 @@ int panthor_devfreq_init(struct panthor_device *ptdev)
>> unsigned long freq = ULONG_MAX;
>> int ret;
>>
>> + if (!device_property_read_bool(ptdev->base.dev, "operating-points-v2"))
>> + return 0;
>> +
>> pdevfreq = drmm_kzalloc(&ptdev->base, sizeof(*ptdev->devfreq), GFP_KERNEL);
>> if (!pdevfreq)
>> return -ENOMEM;
>> @@ -267,7 +270,7 @@ void panthor_devfreq_resume(struct panthor_device *ptdev)
>> {
>> struct panthor_devfreq *pdevfreq = ptdev->devfreq;
>>
>> - if (!pdevfreq->devfreq)
>> + if (!pdevfreq || !pdevfreq->devfreq)
>> return;
>>
>> panthor_devfreq_reset(pdevfreq);
>> @@ -279,7 +282,7 @@ void panthor_devfreq_suspend(struct panthor_device *ptdev)
>> {
>> struct panthor_devfreq *pdevfreq = ptdev->devfreq;
>>
>> - if (!pdevfreq->devfreq)
>> + if (!pdevfreq || !pdevfreq->devfreq)
>> return;
>>
>> drm_WARN_ON(&ptdev->base, devfreq_suspend_device(pdevfreq->devfreq));
>> @@ -290,7 +293,7 @@ void panthor_devfreq_record_busy(struct panthor_device *ptdev)
>> struct panthor_devfreq *pdevfreq = ptdev->devfreq;
>> unsigned long irqflags;
>>
>> - if (!pdevfreq->devfreq)
>> + if (!pdevfreq || !pdevfreq->devfreq)
>> return;
>>
>> spin_lock_irqsave(&pdevfreq->lock, irqflags);
>> @@ -306,7 +309,7 @@ void panthor_devfreq_record_idle(struct panthor_device *ptdev)
>> struct panthor_devfreq *pdevfreq = ptdev->devfreq;
>> unsigned long irqflags;
>>
>> - if (!pdevfreq->devfreq)
>> + if (!pdevfreq || !pdevfreq->devfreq)
>> return;
>>
>> spin_lock_irqsave(&pdevfreq->lock, irqflags);
>> @@ -323,7 +326,7 @@ unsigned long panthor_devfreq_get_freq(struct panthor_device *ptdev)
>> unsigned long freq = 0;
>> int ret;
>>
>> - if (!pdevfreq->devfreq)
>> + if (!pdevfreq || !pdevfreq->devfreq)
>> return 0;
>>
>> ret = pdevfreq->devfreq->profile->get_cur_freq(ptdev->base.dev, &freq);
>
next prev parent reply other threads:[~2026-06-08 14:41 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-28 15:05 [RFC PATCH 00/18] drm/panthor: Add Mali v15 AM virtualization support Karunika Choo
2026-05-28 15:05 ` [RFC PATCH 01/18] drm/panthor: Ignore -EOPNOTSUPP for shader-present nvmem lookup Karunika Choo
2026-06-08 13:06 ` Boris Brezillon
2026-06-08 16:06 ` Steven Price
2026-05-28 15:05 ` [RFC PATCH 02/18] drm/panthor: Move register access helpers out of panthor_device.h Karunika Choo
2026-06-08 13:07 ` Boris Brezillon
2026-06-10 15:50 ` Steven Price
2026-05-28 15:05 ` [RFC PATCH 03/18] drm/panthor: Parse and store GPU_ID fields Karunika Choo
2026-06-08 13:08 ` Boris Brezillon
2026-06-10 15:57 ` Steven Price
2026-05-28 15:05 ` [RFC PATCH 04/18] drm/panthor: Add 64-bit GPU_ID decoding for v15 GPUs Karunika Choo
2026-06-08 13:28 ` Boris Brezillon
2026-06-10 16:02 ` Steven Price
2026-05-28 15:05 ` [RFC PATCH 05/18] drm/panthor: Move register base offsets to the HW description Karunika Choo
2026-06-08 13:32 ` Boris Brezillon
2026-06-08 13:41 ` Boris Brezillon
2026-05-28 15:05 ` [RFC PATCH 06/18] drm/panthor: Derive MMU AS register addresses from base and stride Karunika Choo
2026-06-08 13:45 ` Boris Brezillon
2026-06-11 14:45 ` Steven Price
2026-06-11 16:11 ` Karunika Choo
2026-06-12 15:58 ` Steven Price
2026-05-28 15:05 ` [RFC PATCH 07/18] drm/panthor: Add Mali v15 hardware support Karunika Choo
2026-06-08 13:59 ` Boris Brezillon
2026-06-11 15:18 ` Steven Price
2026-06-11 16:04 ` Karunika Choo
2026-06-12 16:01 ` Steven Price
2026-05-28 15:05 ` [RFC PATCH 08/18] drm/panthor: Skip devfreq when no OPP table is present Karunika Choo
2026-06-08 14:08 ` Boris Brezillon
2026-06-08 14:39 ` Karunika Choo [this message]
2026-06-08 14:51 ` Boris Brezillon
2026-06-11 15:34 ` Steven Price
2026-05-28 15:05 ` [RFC PATCH 09/18] drm/panthor: Add basic AM_SYSTEM support Karunika Choo
2026-05-28 15:05 ` [RFC PATCH 10/18] drm/panthor: Add AM_PARTITION_CONTROL support Karunika Choo
2026-05-28 15:05 ` [RFC PATCH 11/18] drm/panthor: Add AM message helpers Karunika Choo
2026-05-28 15:05 ` [RFC PATCH 12/18] drm/panthor: Add AM_RESOURCE_GROUP support Karunika Choo
2026-05-28 15:05 ` [RFC PATCH 13/18] drm/panthor: Add arbitration scheduler Karunika Choo
2026-05-28 15:05 ` [RFC PATCH 14/18] drm/panthor: Route arbitration events Karunika Choo
2026-05-28 15:05 ` [RFC PATCH 15/18] drm/panthor: Add access-window support Karunika Choo
2026-05-28 15:05 ` [RFC PATCH 16/18] drm/panthor: Synchronize HW component PM transitions Karunika Choo
2026-05-28 15:05 ` [RFC PATCH 17/18] drm/panthor: Route HW component PM through access windows Karunika Choo
2026-05-28 15:05 ` [RFC PATCH 18/18] drm/panthor: Tolerate access-window loss during HW waits Karunika Choo
2026-06-08 16:27 ` [RFC PATCH 00/18] drm/panthor: Add Mali v15 AM virtualization support Boris Brezillon
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=e3c32d54-b85b-4ad8-bd6d-120c4dbfead1@arm.com \
--to=karunika.choo@arm.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nd@arm.com \
--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
all inboxes | Powered by JetHome®