drivers/gpu/drm/panfrost/panfrost_devfreq.h

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/panfrost/panfrost_devfreq.h

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/panfrost/panfrost_devfreq.h
Extension
.h
Size
1188 bytes
Lines
46
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct panfrost_devfreq {
	struct devfreq *devfreq;
	struct thermal_cooling_device *cooling;
	struct devfreq_simple_ondemand_data gov_data;
	bool opp_of_table_added;

	unsigned long current_frequency;
	unsigned long fast_rate;

	ktime_t busy_time;
	ktime_t idle_time;
	ktime_t time_last_update;
	int busy_count;
	/*
	 * Protect busy_time, idle_time, time_last_update and busy_count
	 * because these can be updated concurrently between multiple jobs.
	 */
	spinlock_t lock;
};

int panfrost_devfreq_init(struct panfrost_device *pfdev);
void panfrost_devfreq_fini(struct panfrost_device *pfdev);

void panfrost_devfreq_resume(struct panfrost_device *pfdev);
void panfrost_devfreq_suspend(struct panfrost_device *pfdev);

void panfrost_devfreq_record_busy(struct panfrost_devfreq *devfreq);
void panfrost_devfreq_record_idle(struct panfrost_devfreq *devfreq);

#endif /* __PANFROST_DEVFREQ_H__ */

Annotation

Implementation Notes