DRM(6) -- Plane
在扫描输出过程中,一个平面(plane)代表一个图像源,CRTC 可以对平面进行混合(blend)或叠加(overlaid)显示。plane 从 drm_framebuffer 获取输入数据。平面本身定义了图像的裁剪(cropping)和缩放(scaling)方式,以及它在 display pipeline 可见区域中的位置。平面还可以具有额外的属性来指定平面像素的定位和混合方式,比如旋转(rotation)或 Z 轴位置(Z-position)。所有这些属性都存储在 drm_plane_state 中。 plane 由 struct drm_plane 表示,使用drm_universal_plane_init() 初始化。 每个 plane 都有一个类型,参考 enum drm_plane_type。 每个 CRTC 都必须要有一个 primary plane。 Data structure and api struct drm_plane { struct drm_device *dev; struct list_head head; char *name; struct drm_modeset_lock mutex; struct drm_mode_object base; uint32_t possible_crtcs; uint32_t *format_types; unsigned int format_count; uint64_t *modifiers; unsigned int modifier_count; const struct drm_plane_funcs *funcs; struct drm_object_properties properties; enum drm_plane_type type; unsigned index; const struct drm_plane_helper_funcs *helper_private; struct drm_plane_state *state; struct drm_property *alpha_property; struct drm_property *zpos_property; struct drm_property *rotation_property; struct drm_property *blend_mode_property; struct drm_property *color_encoding_property; struct drm_property *color_range_property; struct drm_property *scaling_filter_property; struct drm_property *hotspot_x_property; struct drm_property *hotspot_y_property; }; possible_crtcs: 该 plane 支持的 crtc 类型,在 plane 初始化时传入。...