forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/drivers/gpu/drm/drm_blend.c
....@@ -23,12 +23,15 @@
2323 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
2424 * OF THIS SOFTWARE.
2525 */
26
-#include <drm/drmP.h>
27
-#include <drm/drm_atomic.h>
28
-#include <drm/drm_blend.h>
26
+
2927 #include <linux/export.h>
3028 #include <linux/slab.h>
3129 #include <linux/sort.h>
30
+
31
+#include <drm/drm_atomic.h>
32
+#include <drm/drm_blend.h>
33
+#include <drm/drm_device.h>
34
+#include <drm/drm_print.h>
3235
3336 #include "drm_crtc_internal.h"
3437
....@@ -101,11 +104,40 @@
101104 * Without this property the rectangle is only scaled, but not rotated or
102105 * reflected.
103106 *
107
+ * Possbile values:
108
+ *
109
+ * "rotate-<degrees>":
110
+ * Signals that a drm plane is rotated <degrees> degrees in counter
111
+ * clockwise direction.
112
+ *
113
+ * "reflect-<axis>":
114
+ * Signals that the contents of a drm plane is reflected along the
115
+ * <axis> axis, in the same way as mirroring.
116
+ *
117
+ * reflect-x::
118
+ *
119
+ * |o | | o|
120
+ * | | -> | |
121
+ * | v| |v |
122
+ *
123
+ * reflect-y::
124
+ *
125
+ * |o | | ^|
126
+ * | | -> | |
127
+ * | v| |o |
128
+ *
104129 * zpos:
105130 * Z position is set up with drm_plane_create_zpos_immutable_property() and
106131 * drm_plane_create_zpos_property(). It controls the visibility of overlapping
107132 * planes. Without this property the primary plane is always below the cursor
108
- * plane, and ordering between all other planes is undefined.
133
+ * plane, and ordering between all other planes is undefined. The positive
134
+ * Z axis points towards the user, i.e. planes with lower Z position values
135
+ * are underneath planes with higher Z position values. Two planes with the
136
+ * same Z position value have undefined ordering. Note that the Z position
137
+ * value can also be immutable, to inform userspace about the hard-coded
138
+ * stacking of planes, see drm_plane_create_zpos_immutable_property(). If
139
+ * any plane has a zpos property (either mutable or immutable), then all
140
+ * planes shall have a zpos property.
109141 *
110142 * pixel blend mode:
111143 * Pixel blend mode is set up with drm_plane_create_blend_mode_property().
....@@ -152,6 +184,12 @@
152184 * Plane alpha value set by the plane "alpha" property. If the
153185 * plane does not expose the "alpha" property, then this is
154186 * assumed to be 1.0
187
+ *
188
+ * IN_FORMATS:
189
+ * Blob property which contains the set of buffer format and modifier
190
+ * pairs supported by this plane. The blob is a drm_format_modifier_blob
191
+ * struct. Without this property the plane doesn't support buffers with
192
+ * modifiers. Userspace cannot change this property.
155193 *
156194 * Note that all the property extensions described here apply either to the
157195 * plane or the CRTC (e.g. for the background color, which currently is not
....@@ -308,10 +346,10 @@
308346 * should be set to 0 and max to maximal number of planes for given crtc - 1.
309347 *
310348 * If zpos of some planes cannot be changed (like fixed background or
311
- * cursor/topmost planes), driver should adjust min/max values and assign those
312
- * planes immutable zpos property with lower or higher values (for more
349
+ * cursor/topmost planes), drivers shall adjust the min/max values and assign
350
+ * those planes immutable zpos properties with lower or higher values (for more
313351 * information, see drm_plane_create_zpos_immutable_property() function). In such
314
- * case driver should also assign proper initial zpos values for all planes in
352
+ * case drivers shall also assign proper initial zpos values for all planes in
315353 * its plane_reset() callback, so the planes will be always sorted properly.
316354 *
317355 * See also drm_atomic_normalize_zpos().