#define pr_fmt(fmt) …
#include <linux/debugfs.h>
#include <linux/errno.h>
#include <linux/mutex.h>
#include <linux/pm_opp.h>
#include <linux/sort.h>
#include <linux/clk.h>
#include <linux/bitmap.h>
#include "dpu_kms.h"
#include "dpu_trace.h"
#include "dpu_crtc.h"
#include "dpu_core_perf.h"
enum dpu_perf_mode { … };
static u64 _dpu_core_perf_calc_bw(const struct dpu_perf_cfg *perf_cfg,
struct drm_crtc *crtc)
{ … }
static u64 _dpu_core_perf_calc_clk(const struct dpu_perf_cfg *perf_cfg,
struct drm_crtc *crtc, struct drm_crtc_state *state)
{ … }
static struct dpu_kms *_dpu_crtc_get_kms(struct drm_crtc *crtc)
{ … }
static void _dpu_core_perf_calc_crtc(const struct dpu_core_perf *core_perf,
struct drm_crtc *crtc,
struct drm_crtc_state *state,
struct dpu_core_perf_params *perf)
{ … }
int dpu_core_perf_crtc_check(struct drm_crtc *crtc,
struct drm_crtc_state *state)
{ … }
static int _dpu_core_perf_crtc_update_bus(struct dpu_kms *kms,
struct drm_crtc *crtc)
{ … }
void dpu_core_perf_crtc_release_bw(struct drm_crtc *crtc)
{ … }
static u64 _dpu_core_perf_get_core_clk_rate(struct dpu_kms *kms)
{ … }
int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
int params_changed)
{ … }
#ifdef CONFIG_DEBUG_FS
static ssize_t _dpu_core_perf_mode_write(struct file *file,
const char __user *user_buf, size_t count, loff_t *ppos)
{ … }
static ssize_t _dpu_core_perf_mode_read(struct file *file,
char __user *buff, size_t count, loff_t *ppos)
{ … }
static const struct file_operations dpu_core_perf_mode_fops = …;
int dpu_core_perf_debugfs_init(struct dpu_kms *dpu_kms, struct dentry *parent)
{ … }
#endif
int dpu_core_perf_init(struct dpu_core_perf *perf,
const struct dpu_perf_cfg *perf_cfg,
unsigned long max_core_clk_rate)
{ … }