forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.h
....@@ -1,13 +1,5 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /* Copyright (c) 2015-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_HW_CTL_H
....@@ -99,6 +91,15 @@
9991 u32 flushbits);
10092
10193 /**
94
+ * OR in the given flushbits to the cached pending_intf_flush_mask
95
+ * No effect on hardware
96
+ * @ctx : ctl path ctx pointer
97
+ * @flushbits : module flushmask
98
+ */
99
+ void (*update_pending_intf_flush)(struct dpu_hw_ctl *ctx,
100
+ u32 flushbits);
101
+
102
+ /**
102103 * Write the value of the pending_flush_mask to hardware
103104 * @ctx : ctl path ctx pointer
104105 */
....@@ -138,13 +139,25 @@
138139 uint32_t (*get_bitmask_mixer)(struct dpu_hw_ctl *ctx,
139140 enum dpu_lm blk);
140141
142
+ uint32_t (*get_bitmask_dspp)(struct dpu_hw_ctl *ctx,
143
+ enum dpu_dspp blk);
144
+
145
+ /**
146
+ * Query the value of the intf flush mask
147
+ * No effect on hardware
148
+ * @ctx : ctl path ctx pointer
149
+ */
141150 int (*get_bitmask_intf)(struct dpu_hw_ctl *ctx,
142151 u32 *flushbits,
143152 enum dpu_intf blk);
144153
145
- int (*get_bitmask_cdm)(struct dpu_hw_ctl *ctx,
146
- u32 *flushbits,
147
- enum dpu_cdm blk);
154
+ /**
155
+ * Query the value of the intf active flush mask
156
+ * No effect on hardware
157
+ * @ctx : ctl path ctx pointer
158
+ */
159
+ int (*get_bitmask_active_intf)(struct dpu_hw_ctl *ctx,
160
+ u32 *flushbits, enum dpu_intf blk);
148161
149162 /**
150163 * Set all blend stages to disabled
....@@ -171,6 +184,7 @@
171184 * @mixer_count: number of mixers
172185 * @mixer_hw_caps: mixer hardware capabilities
173186 * @pending_flush_mask: storage for pending ctl_flush managed via ops
187
+ * @pending_intf_flush_mask: pending INTF flush
174188 * @ops: operation list
175189 */
176190 struct dpu_hw_ctl {
....@@ -183,6 +197,7 @@
183197 int mixer_count;
184198 const struct dpu_lm_cfg *mixer_hw_caps;
185199 u32 pending_flush_mask;
200
+ u32 pending_intf_flush_mask;
186201
187202 /* ops */
188203 struct dpu_hw_ctl_ops ops;
....@@ -207,7 +222,7 @@
207222 */
208223 struct dpu_hw_ctl *dpu_hw_ctl_init(enum dpu_ctl idx,
209224 void __iomem *addr,
210
- struct dpu_mdss_cfg *m);
225
+ const struct dpu_mdss_cfg *m);
211226
212227 /**
213228 * dpu_hw_ctl_destroy(): Destroys ctl driver context