[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c0c6e250-e5fc-4511-bb5b-9812495a1e59@arm.com>
Date: Mon, 27 Oct 2025 14:12:03 +0000
From: Karunika Choo <karunika.choo@....com>
To: Boris Brezillon <boris.brezillon@...labora.com>
Cc: dri-devel@...ts.freedesktop.org, nd@....com,
Steven Price <steven.price@....com>, Liviu Dudau <liviu.dudau@....com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 3/8] drm/panthor: Introduce panthor_pwr API and power
control framework
On 27/10/2025 11:36, Boris Brezillon wrote:
> On Mon, 27 Oct 2025 10:36:13 +0000
> Karunika Choo <karunika.choo@....com> wrote:
>
>> On 26/10/2025 08:13, Boris Brezillon wrote:
>>> On Fri, 24 Oct 2025 21:21:12 +0100
>>> Karunika Choo <karunika.choo@....com> wrote:
>>>> diff --git a/drivers/gpu/drm/panthor/panthor_hw.c b/drivers/gpu/drm/panthor/panthor_hw.c
>>>> index 092962db5ccd..09aef34a6ce7 100644
>>>> --- a/drivers/gpu/drm/panthor/panthor_hw.c
>>>> +++ b/drivers/gpu/drm/panthor/panthor_hw.c
>>>> @@ -192,3 +192,8 @@ int panthor_hw_init(struct panthor_device *ptdev)
>>>>
>>>> return 0;
>>>> }
>>>> +
>>>> +bool panthor_hw_has_pwr_ctrl(struct panthor_device *ptdev)
>>>> +{
>>>> + return GPU_ARCH_MAJOR(ptdev->gpu_info.gpu_id) >= 14;
>>>> +}
>>>> diff --git a/drivers/gpu/drm/panthor/panthor_hw.h b/drivers/gpu/drm/panthor/panthor_hw.h
>>>> index 2665d6dde2e3..4c71f27d1c0b 100644
>>>> --- a/drivers/gpu/drm/panthor/panthor_hw.h
>>>> +++ b/drivers/gpu/drm/panthor/panthor_hw.h
>>>> @@ -32,4 +32,6 @@ struct panthor_hw {
>>>>
>>>> int panthor_hw_init(struct panthor_device *ptdev);
>>>>
>>>> +bool panthor_hw_has_pwr_ctrl(struct panthor_device *ptdev);
>>>
>>> Let's make this a static inline function so the compiler can inline its
>>> content at compile time.
>>>
>>
>> I wonder if making it static inline is a good idea. We will need to move
>> this function into panthor_device.h to be able to do so as we need to
>> access the panthor_device structure. Would this still be desirable?
>
> Can't we just include panthor_device.h from panthor_hw.h instead? As
> far as I can tell, panthor_device.h doesn't include panthor_hw.h, so we
> should be fine.
v2 changed this, but let me see if I can rework these to enable both
your's and Steve's suggestions.
Kind regards,
Karunika Choo
Powered by blists - more mailing lists