Re: [PATCH v2 3/8] drm/panthor: Introduce panthor_pwr API and power control framework
From: Boris Brezillon
Date: Sun Oct 26 2025 - 04:13:56 EST
On Fri, 24 Oct 2025 21:21:12 +0100
Karunika Choo <karunika.choo@xxxxxxx> 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.