Files
linux/drivers/gpu/drm/panthor/panthor_devfreq.h
T
Nicolas Frattaroli 3dd4844ba0 drm/panthor: call into devfreq for current frequency
As it stands, panthor keeps a cached current frequency value for when it
wants to retrieve it. This doesn't work well for when things might
switch frequency without panthor's knowledge.

Instead, implement the get_cur_freq operation, and expose it through a
helper function to the rest of panthor.

Reviewed-by: Chia-I Wu <[email protected]>
Reviewed-by: Steven Price <[email protected]>
Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
Reviewed-by: Karunika Choo <[email protected]>
Reviewed-by: Liviu Dudau <[email protected]>
Signed-off-by: Nicolas Frattaroli <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Liviu Dudau <[email protected]>
2025-11-03 15:27:25 +00:00

24 lines
652 B
C

/* SPDX-License-Identifier: GPL-2.0 or MIT */
/* Copyright 2019 Collabora ltd. */
#ifndef __PANTHOR_DEVFREQ_H__
#define __PANTHOR_DEVFREQ_H__
struct devfreq;
struct thermal_cooling_device;
struct panthor_device;
struct panthor_devfreq;
int panthor_devfreq_init(struct panthor_device *ptdev);
void panthor_devfreq_resume(struct panthor_device *ptdev);
void panthor_devfreq_suspend(struct panthor_device *ptdev);
void panthor_devfreq_record_busy(struct panthor_device *ptdev);
void panthor_devfreq_record_idle(struct panthor_device *ptdev);
unsigned long panthor_devfreq_get_freq(struct panthor_device *ptdev);
#endif /* __PANTHOR_DEVFREQ_H__ */