forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-11 223293205a7265c8b02882461ba8996650048ade
kernel/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h
....@@ -1,13 +1,5 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
2
- *
3
- * This program is free software; you can redistribute it and/or modify
4
- * it under the terms of the GNU General Public License version 2 and
5
- * only version 2 as published by the Free Software Foundation.
6
- *
7
- * This program is distributed in the hope that it will be useful,
8
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
- * GNU General Public License for more details.
113 */
124
135 #ifndef _DPU_CORE_PERF_H_
....@@ -19,9 +11,21 @@
1911 #include <drm/drm_crtc.h>
2012
2113 #include "dpu_hw_catalog.h"
22
-#include "dpu_power_handle.h"
2314
2415 #define DPU_PERF_DEFAULT_MAX_CORE_CLK_RATE 412500000
16
+
17
+/**
18
+ * enum dpu_core_perf_data_bus_id - data bus identifier
19
+ * @DPU_CORE_PERF_DATA_BUS_ID_MNOC: DPU/MNOC data bus
20
+ * @DPU_CORE_PERF_DATA_BUS_ID_LLCC: MNOC/LLCC data bus
21
+ * @DPU_CORE_PERF_DATA_BUS_ID_EBI: LLCC/EBI data bus
22
+ */
23
+enum dpu_core_perf_data_bus_id {
24
+ DPU_CORE_PERF_DATA_BUS_ID_MNOC,
25
+ DPU_CORE_PERF_DATA_BUS_ID_LLCC,
26
+ DPU_CORE_PERF_DATA_BUS_ID_EBI,
27
+ DPU_CORE_PERF_DATA_BUS_ID_MAX,
28
+};
2529
2630 /**
2731 * struct dpu_core_perf_params - definition of performance parameters
....@@ -30,8 +34,8 @@
3034 * @core_clk_rate: core clock rate request
3135 */
3236 struct dpu_core_perf_params {
33
- u64 max_per_pipe_ib[DPU_POWER_HANDLE_DBUS_ID_MAX];
34
- u64 bw_ctl[DPU_POWER_HANDLE_DBUS_ID_MAX];
37
+ u64 max_per_pipe_ib;
38
+ u64 bw_ctl;
3539 u64 core_clk_rate;
3640 };
3741
....@@ -52,7 +56,6 @@
5256 * @dev: Pointer to drm device
5357 * @debugfs_root: top level debug folder
5458 * @catalog: Pointer to catalog configuration
55
- * @phandle: Pointer to power handler
5659 * @core_clk: Pointer to core clock structure
5760 * @core_clk_rate: current core clock rate
5861 * @max_core_clk_rate: maximum allowable core clock rate
....@@ -66,7 +69,6 @@
6669 struct drm_device *dev;
6770 struct dentry *debugfs_root;
6871 struct dpu_mdss_cfg *catalog;
69
- struct dpu_power_handle *phandle;
7072 struct dss_clk *core_clk;
7173 u64 core_clk_rate;
7274 u64 max_core_clk_rate;
....@@ -113,21 +115,20 @@
113115 * @perf: Pointer to core performance context
114116 * @dev: Pointer to drm device
115117 * @catalog: Pointer to catalog
116
- * @phandle: Pointer to power handle
117118 * @core_clk: pointer to core clock
118119 */
119120 int dpu_core_perf_init(struct dpu_core_perf *perf,
120121 struct drm_device *dev,
121122 struct dpu_mdss_cfg *catalog,
122
- struct dpu_power_handle *phandle,
123123 struct dss_clk *core_clk);
124
+
125
+struct dpu_kms;
124126
125127 /**
126128 * dpu_core_perf_debugfs_init - initialize debugfs for core performance context
127
- * @perf: Pointer to core performance context
129
+ * @dpu_kms: Pointer to the dpu_kms struct
128130 * @debugfs_parent: Pointer to parent debugfs
129131 */
130
-int dpu_core_perf_debugfs_init(struct dpu_core_perf *perf,
131
- struct dentry *parent);
132
+int dpu_core_perf_debugfs_init(struct dpu_kms *dpu_kms, struct dentry *parent);
132133
133134 #endif /* _DPU_CORE_PERF_H_ */