|
drm_universal_plane_alloc() - Allocate and initialize an universal plane object @dev: DRM device @type: the type of the struct which contains struct &drm_plane @member: the name of the &drm_plane within @type @possible_crtcs: bitmask of possible CRTCs @funcs: callbacks for the new plane @formats: array of supported formats (DRM_FORMAT_*) @format_count: number of elements in @formats @format_modifiers: array of struct drm_format modifiers terminated by DRM_FORMAT_MOD_INVALID @plane_type: type of plane (overlay, primary, cursor)
Allocates and initializes a plane object of type @type. The caller is responsible for releasing the allocated memory with kfree().
Drivers are encouraged to use drmm_universal_plane_alloc() instead.
Drivers that only support the DRM_FORMAT_MOD_LINEAR modifier support may set @format_modifiers to NULL. The plane will advertise the linear modifier.
Returns: Pointer to new plane, or ERR_PTR on failure.
|
| #define | drmm_universal_plane_alloc(dev, type, member, possible_crtcs, funcs, formats, format_count, format_modifiers, plane_type, name, ...) |
| |
| #define | drm_universal_plane_alloc(dev, type, member, possible_crtcs, funcs, formats, format_count, format_modifiers, plane_type, name, ...) |
| |
| #define | drm_for_each_plane_mask(plane, dev, plane_mask) |
| |
| #define | drm_for_each_legacy_plane(plane, dev) |
| |
| #define | drm_for_each_plane(plane, dev) list_for_each_entry(plane, &(dev)->mode_config.plane_list, head) |
| |
| struct drm_plane uint32_t | possible_crtcs |
| |
| struct drm_plane uint32_t const struct drm_plane_funcs * | funcs |
| |
| struct drm_plane uint32_t const struct drm_plane_funcs const uint32_t * | formats |
| |
| struct drm_plane uint32_t const struct drm_plane_funcs const uint32_t unsigned int | format_count |
| |
| struct drm_plane uint32_t const struct drm_plane_funcs const uint32_t unsigned int const uint64_t * | format_modifiers |
| |
| struct drm_plane uint32_t const struct drm_plane_funcs const uint32_t unsigned int const uint64_t enum drm_plane_type type const char * | name |
| |
| size_t | size |
| |
| size_t size_t | offset |
| |
| | __printf (10, 11) void *__drmm_universal_plane_alloc(struct drm_device *dev |
| |
| struct drm_plane * | drm_plane_from_index (struct drm_device *dev, int idx) |
| |
| void | drm_plane_force_disable (struct drm_plane *plane) |
| |
| int | drm_mode_plane_set_obj_prop (struct drm_plane *plane, struct drm_property *property, uint64_t value) |
| |
| bool | drm_plane_has_format (struct drm_plane *plane, u32 format, u64 modifier) |
| |
| bool | drm_any_plane_has_format (struct drm_device *dev, u32 format, u64 modifier) |
| |
| void | drm_plane_enable_fb_damage_clips (struct drm_plane *plane) |
| |
| unsigned int | drm_plane_get_damage_clips_count (const struct drm_plane_state *state) |
| |
| struct drm_mode_rect * | drm_plane_get_damage_clips (const struct drm_plane_state *state) |
| |
| int | drm_plane_create_scaling_filter_property (struct drm_plane *plane, unsigned int supported_filters) |
| |
| int | drm_plane_add_size_hints_property (struct drm_plane *plane, const struct drm_plane_size_hint *hints, int num_hints) |
| |
| int | drm_plane_create_color_pipeline_property (struct drm_plane *plane, const struct drm_prop_enum_list *pipelines, int num_pipelines) |
| |
enum drm_plane_type - uapi plane type enumeration
For historical reasons not all planes are made the same. This enumeration is used to tell the different types of planes apart to implement the different uapi semantics for them. For userspace which is universal plane aware and which is using that atomic IOCTL there's no difference between these planes (beyong what the driver and hardware can support of course).
For compatibility with legacy userspace, only overlay planes are made available to userspace by default. Userspace clients may set the &DRM_CLIENT_CAP_UNIVERSAL_PLANES client capability bit to indicate that they wish to receive a universal plane list containing all plane types. See also drm_for_each_legacy_plane().
In addition to setting each plane's type, drivers need to setup the &drm_crtc.primary and optionally &drm_crtc.cursor pointers for legacy IOCTLs. See drm_crtc_init_with_planes().
WARNING: The values of this enum is UABI since they're exposed in the "type" property.
| Enumerator |
|---|
| DRM_PLANE_TYPE_OVERLAY | @DRM_PLANE_TYPE_OVERLAY:
Overlay planes represent all non-primary, non-cursor planes. Some drivers refer to these types of planes as "sprites" internally.
|
| DRM_PLANE_TYPE_PRIMARY | @DRM_PLANE_TYPE_PRIMARY:
A primary plane attached to a CRTC is the most likely to be able to light up the CRTC when no scaling/cropping is used and the plane covers the whole CRTC.
|
| DRM_PLANE_TYPE_CURSOR | @DRM_PLANE_TYPE_CURSOR:
A cursor plane attached to a CRTC is more likely to be able to be enabled when no scaling/cropping is used and the framebuffer has the size indicated by &drm_mode_config.cursor_width and &drm_mode_config.cursor_height. Additionally, if the driver doesn't support modifiers, the framebuffer should have a linear layout.
|