On 26/10/2025 08:13, Boris Brezillon wrote:
> On Fri, 24 Oct 2025 21:21:12 +0100
> Karunika Choo <[email protected]> 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?

Reply via email to