mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-28 21:45:01 +08:00
9bfacfc82f
Introduce a proper panfrost_devfreq to deal with devfreq variables. Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Signed-off-by: Clément Péron <peron.clem@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200710095409.407087-5-peron.clem@gmail.com
33 lines
841 B
C
33 lines
841 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* Copyright 2019 Collabora ltd. */
|
|
|
|
#ifndef __PANFROST_DEVFREQ_H__
|
|
#define __PANFROST_DEVFREQ_H__
|
|
|
|
#include <linux/ktime.h>
|
|
|
|
struct devfreq;
|
|
struct thermal_cooling_device;
|
|
|
|
struct panfrost_device;
|
|
|
|
struct panfrost_devfreq {
|
|
struct devfreq *devfreq;
|
|
struct thermal_cooling_device *cooling;
|
|
ktime_t busy_time;
|
|
ktime_t idle_time;
|
|
ktime_t time_last_update;
|
|
atomic_t busy_count;
|
|
};
|
|
|
|
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__ */
|