File Index
Files and directories
Sign in
FILE

dpu_core_perf.h

File preview with syntax highlighting.

linux-6.19.14/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h C
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 3 */
 4
 5#ifndef _DPU_CORE_PERF_H_
 6#define _DPU_CORE_PERF_H_
 7
 8#include <linux/types.h>
 9#include <linux/dcache.h>
10#include <linux/mutex.h>
11#include <drm/drm_crtc.h>
12
13#include "dpu_hw_catalog.h"
14
15/**
16 * struct dpu_core_perf_params - definition of performance parameters
17 * @max_per_pipe_ib: maximum instantaneous bandwidth request
18 * @bw_ctl: arbitrated bandwidth request
19 * @core_clk_rate: core clock rate request
20 */
21struct dpu_core_perf_params {
22	u32 max_per_pipe_ib;
23	u64 bw_ctl;
24	u64 core_clk_rate;
25};
26
27/**
28 * struct dpu_core_perf_tune - definition of performance tuning control
29 * @mode: performance mode
30 */
31struct dpu_core_perf_tune {
32	u32 mode;
33};
34
35/**
36 * struct dpu_core_perf - definition of core performance context
37 * @perf_cfg: Platform-specific performance configuration
38 * @core_clk_rate: current core clock rate
39 * @max_core_clk_rate: maximum allowable core clock rate
40 * @perf_tune: debug control for performance tuning
41 * @enable_bw_release: debug control for bandwidth release
42 * @fix_core_clk_rate: fixed core clock request in Hz used in mode 2
43 * @fix_core_ib_vote: fixed core ib vote in KBps used in mode 2
44 * @fix_core_ab_vote: fixed core ab vote in KBps used in mode 2
45 */
46struct dpu_core_perf {
47	const struct dpu_perf_cfg *perf_cfg;
48	u64 core_clk_rate;
49	u64 max_core_clk_rate;
50	struct dpu_core_perf_tune perf_tune;
51	u32 enable_bw_release;
52	u64 fix_core_clk_rate;
53	u32 fix_core_ib_vote;
54	u32 fix_core_ab_vote;
55};
56
57u64 dpu_core_perf_adjusted_mode_clk(u64 clk_rate,
58				    const struct dpu_perf_cfg *perf_cfg);
59
60int dpu_core_perf_crtc_check(struct drm_crtc *crtc,
61		struct drm_crtc_state *state);
62
63int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
64			      int params_changed);
65
66void dpu_core_perf_crtc_release_bw(struct drm_crtc *crtc);
67
68int dpu_core_perf_init(struct dpu_core_perf *perf,
69		const struct dpu_perf_cfg *perf_cfg,
70		unsigned long max_core_clk_rate);
71
72struct dpu_kms;
73
74int dpu_core_perf_debugfs_init(struct dpu_kms *dpu_kms, struct dentry *parent);
75
76#endif /* _DPU_CORE_PERF_H_ */
~/ Read-only file preview.