0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef __DRM_BLEND_H__
0024 #define __DRM_BLEND_H__
0025
0026 #include <linux/list.h>
0027 #include <linux/ctype.h>
0028 #include <drm/drm_mode.h>
0029
0030 #define DRM_MODE_BLEND_PREMULTI 0
0031 #define DRM_MODE_BLEND_COVERAGE 1
0032 #define DRM_MODE_BLEND_PIXEL_NONE 2
0033
0034 struct drm_device;
0035 struct drm_atomic_state;
0036 struct drm_plane;
0037
0038 static inline bool drm_rotation_90_or_270(unsigned int rotation)
0039 {
0040 return rotation & (DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_270);
0041 }
0042
0043 #define DRM_BLEND_ALPHA_OPAQUE 0xffff
0044
0045 int drm_plane_create_alpha_property(struct drm_plane *plane);
0046 int drm_plane_create_rotation_property(struct drm_plane *plane,
0047 unsigned int rotation,
0048 unsigned int supported_rotations);
0049 unsigned int drm_rotation_simplify(unsigned int rotation,
0050 unsigned int supported_rotations);
0051
0052 int drm_plane_create_zpos_property(struct drm_plane *plane,
0053 unsigned int zpos,
0054 unsigned int min, unsigned int max);
0055 int drm_plane_create_zpos_immutable_property(struct drm_plane *plane,
0056 unsigned int zpos);
0057 int drm_atomic_normalize_zpos(struct drm_device *dev,
0058 struct drm_atomic_state *state);
0059 int drm_plane_create_blend_mode_property(struct drm_plane *plane,
0060 unsigned int supported_modes);
0061 #endif