forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h
....@@ -1,19 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
34 * Copyright (C) 2013 Red Hat
45 * Author: Rob Clark <robdclark@gmail.com>
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms of the GNU General Public License version 2 as published by
8
- * the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful, but WITHOUT
11
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13
- * more details.
14
- *
15
- * You should have received a copy of the GNU General Public License along with
16
- * this program. If not, see <http://www.gnu.org/licenses/>.
176 */
187
198 #ifndef _DPU_PLANE_H_
....@@ -28,23 +17,20 @@
2817 /**
2918 * struct dpu_plane_state: Define dpu extension of drm plane state object
3019 * @base: base drm plane state object
31
- * @property_state: Local storage for msm_prop properties
32
- * @property_values: cached plane property values
3320 * @aspace: pointer to address space for input/output buffers
34
- * @input_fence: dereferenced input fence pointer
3521 * @stage: assigned by crtc blender
3622 * @multirect_index: index of the rectangle of SSPP
3723 * @multirect_mode: parallel or time multiplex multirect mode
3824 * @pending: whether the current update is still pending
3925 * @scaler3_cfg: configuration data for scaler3
4026 * @pixel_ext: configuration data for pixel extensions
41
- * @scaler_check_state: indicates status of user provided pixel extension data
4227 * @cdp_cfg: CDP configuration
28
+ * @plane_fetch_bw: calculated BW per plane
29
+ * @plane_clk: calculated clk per plane
4330 */
4431 struct dpu_plane_state {
4532 struct drm_plane_state base;
4633 struct msm_gem_address_space *aspace;
47
- void *input_fence;
4834 enum dpu_stage stage;
4935 uint32_t multirect_index;
5036 uint32_t multirect_mode;
....@@ -55,6 +41,8 @@
5541 struct dpu_hw_pixel_ext pixel_ext;
5642
5743 struct dpu_hw_pipe_cdp_cfg cdp_cfg;
44
+ u64 plane_fetch_bw;
45
+ u64 plane_clk;
5846 };
5947
6048 /**
....@@ -107,12 +95,6 @@
10795 void dpu_plane_flush(struct drm_plane *plane);
10896
10997 /**
110
- * dpu_plane_kickoff - final plane operations before commit kickoff
111
- * @plane: Pointer to drm plane structure
112
- */
113
-void dpu_plane_kickoff(struct drm_plane *plane);
114
-
115
-/**
11698 * dpu_plane_set_error: enable/disable error condition
11799 * @plane: pointer to drm_plane structure
118100 */
....@@ -122,7 +104,7 @@
122104 * dpu_plane_init - create new dpu plane for the given pipe
123105 * @dev: Pointer to DRM device
124106 * @pipe: dpu hardware pipe identifier
125
- * @primary_plane: true if this pipe is primary plane for crtc
107
+ * @type: Plane type - PRIMARY/OVERLAY/CURSOR
126108 * @possible_crtcs: bitmask of crtc that can be attached to the given pipe
127109 * @master_plane_id: primary plane id of a multirect pipe. 0 value passed for
128110 * a regular plane initialization. A non-zero primary plane
....@@ -130,7 +112,7 @@
130112 *
131113 */
132114 struct drm_plane *dpu_plane_init(struct drm_device *dev,
133
- uint32_t pipe, bool primary_plane,
115
+ uint32_t pipe, enum drm_plane_type type,
134116 unsigned long possible_crtcs, u32 master_plane_id);
135117
136118 /**
....@@ -147,14 +129,6 @@
147129 void dpu_plane_clear_multirect(const struct drm_plane_state *drm_state);
148130
149131 /**
150
- * dpu_plane_wait_input_fence - wait for input fence object
151
- * @plane: Pointer to DRM plane object
152
- * @wait_ms: Wait timeout value
153
- * Returns: Zero on success
154
- */
155
-int dpu_plane_wait_input_fence(struct drm_plane *plane, uint32_t wait_ms);
156
-
157
-/**
158132 * dpu_plane_color_fill - enables color fill on plane
159133 * @plane: Pointer to DRM plane object
160134 * @color: RGB fill color value, [23..16] Blue, [15..8] Green, [7..0] Red
....@@ -163,13 +137,5 @@
163137 */
164138 int dpu_plane_color_fill(struct drm_plane *plane,
165139 uint32_t color, uint32_t alpha);
166
-
167
-/**
168
- * dpu_plane_set_revalidate - sets revalidate flag which forces a full
169
- * validation of the plane properties in the next atomic check
170
- * @plane: Pointer to DRM plane object
171
- * @enable: Boolean to set/unset the flag
172
- */
173
-void dpu_plane_set_revalidate(struct drm_plane *plane, bool enable);
174140
175141 #endif /* _DPU_PLANE_H_ */