linux/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c

// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 */

#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 - performance tuning mode
 * @DPU_PERF_MODE_NORMAL: performance controlled by user mode client
 * @DPU_PERF_MODE_MINIMUM: performance bounded by minimum setting
 * @DPU_PERF_MODE_FIXED: performance bounded by fixed setting
 * @DPU_PERF_MODE_MAX: maximum value, used for error checking
 */
enum dpu_perf_mode {};

/**
 * _dpu_core_perf_calc_bw() - to calculate BW per crtc
 * @perf_cfg: performance configuration
 * @crtc: pointer to a crtc
 * Return: returns aggregated BW for all planes in crtc.
 */
static u64 _dpu_core_perf_calc_bw(const struct dpu_perf_cfg *perf_cfg,
		struct drm_crtc *crtc)
{}

/**
 * _dpu_core_perf_calc_clk() - to calculate clock per crtc
 * @perf_cfg: performance configuration
 * @crtc: pointer to a crtc
 * @state: pointer to a crtc state
 * Return: returns max clk for all planes in 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)
{}

/**
 * dpu_core_perf_crtc_release_bw() - request zero bandwidth
 * @crtc: pointer to a crtc
 *
 * Function checks a state variable for the crtc, if all pending commit
 * requests are done, meaning no more bandwidth is needed, release
 * bandwidth request.
 */
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)
{}