Lines Matching full:plane

44  * struct drm_plane_state - mutable plane state
53 /** @plane: backpointer to the plane */
54 struct drm_plane *plane; member
88 * Left position of visible portion of plane on crtc, signed dest
96 * Upper position of visible portion of plane on crtc, signed dest
101 /** @crtc_w: width of visible portion of plane on crtc */
102 /** @crtc_h: height of visible portion of plane on crtc */
106 * @src_x: left position of visible portion of plane within plane (in
111 * @src_y: upper position of visible portion of plane within plane (in
115 /** @src_w: width of visible portion of plane (in 16.16) */
116 /** @src_h: height of visible portion of plane (in 16.16) */
121 * Opacity of the plane with 0 as completely transparent and 0xffff as
130 * the current plane are composited with the background. Value can be
137 * Rotation of the plane. See drm_plane_create_rotation_property() for
144 * Priority of the given plane on crtc (optional).
149 * plane object IDs; the plane with a higher ID is stacked on top of a
150 * plane with a lower ID.
183 * Blob representing damage (area in plane framebuffer that changed
184 * since last plane update) as an array of &drm_mode_rect in framebuffer
185 * coodinates of the attached framebuffer. Note that unlike plane src,
196 * source coordinates of the plane (in 16.16).
206 * clipped destination coordinates of the plane.
218 * Visibility of the plane. This can be false even if fb!=NULL and
232 * and for async plane updates.
267 * struct drm_plane_funcs - driver plane control functions
273 * This is the legacy entry point to enable and configure the plane for
275 * plane, i.e. the passed-in crtc and fb paramters are never NULL.
279 * values). Devices that don't support subpixel plane coordinates can
296 int (*update_plane)(struct drm_plane *plane,
307 * This is the legacy entry point to disable the plane. The DRM core
319 int (*disable_plane)(struct drm_plane *plane,
325 * Clean up plane resources. This is only called at driver unload time
326 * through drm_mode_config_cleanup() since a plane cannot be hotplugged
329 void (*destroy)(struct drm_plane *plane);
334 * Reset plane hardware and software state to off. This function isn't
341 void (*reset)(struct drm_plane *plane);
347 * plane.
357 int (*set_property)(struct drm_plane *plane,
363 * Duplicate the current atomic state for this plane and return it.
391 struct drm_plane_state *(*atomic_duplicate_state)(struct drm_plane *plane);
401 void (*atomic_destroy_state)(struct drm_plane *plane,
441 * asks for properties attached to this plane). No other validation is
446 int (*atomic_set_property)(struct drm_plane *plane,
467 * properties attached to this plane).
469 int (*atomic_get_property)(struct drm_plane *plane,
477 * interfaces attached to the plane like debugfs interfaces.
486 int (*late_register)(struct drm_plane *plane);
492 * userspace interfaces attached to the plane from
497 void (*early_unregister)(struct drm_plane *plane);
515 * format/modifier combination is valid for the plane. This allows the
519 * If not present, then any modifier in the plane's modifier
520 * list is allowed with any of the plane's formats.
524 * True if the given modifier is valid for that format on the plane.
527 bool (*format_mod_supported)(struct drm_plane *plane, uint32_t format,
532 * enum drm_plane_type - uapi plane type enumeration
536 * uapi semantics for them. For userspace which is universal plane aware and
543 * wish to receive a universal plane list containing all plane types. See also
546 * In addition to setting each plane's type, drivers need to setup the
565 * A primary plane attached to a CRTC is the most likely to be able to
566 * light up the CRTC when no scaling/cropping is used and the plane
574 * A cursor plane attached to a CRTC is more likely to be able to be
585 * struct drm_plane - central DRM plane control structure
589 * the color conversion, see `Plane Composition Properties`_ for more details,
594 /** @dev: DRM device this plane belongs to */
612 * Protects modeset plane state, together with the &drm_crtc.mutex of
613 * CRTC this plane is linked to (when active, getting activated or
624 * @possible_crtcs: pipes this plane can be bound to constructed from
628 /** @format_types: array of formats supported by this plane */
634 * plane. Used by the non-atomic driver compatibility wrapper only.
638 /** @modifiers: array of modifiers supported by this plane */
669 /** @funcs: plane control functions */
672 /** @properties: property tracking for this plane */
675 /** @type: Type of plane, see &enum drm_plane_type for details. */
680 * index. It is invariant over the lifetime of the plane.
690 * Current atomic state for this plane.
693 * access the current plane state without taking locks. Either by going
704 * Optional alpha property for this plane. See
710 * Optional zpos property for this plane. See
716 * Optional rotation property for this plane. See
722 * Optional "pixel blend mode" enum property for this plane.
724 * describing how the pixels from the current plane are composited with
757 struct drm_plane *plane,
765 void drm_plane_cleanup(struct drm_plane *plane);
779 * drmm_universal_plane_alloc - Allocate and initialize an universal plane object
784 * @funcs: callbacks for the new plane
789 * @plane_type: type of plane (overlay, primary, cursor)
790 * @name: printf style format string for the plane name, or NULL for default name
792 * Allocates and initializes a plane object of type @type. Cleanup is
799 * @format_modifiers to NULL. The plane will advertise the linear modifier.
802 * Pointer to new plane, or ERR_PTR on failure.
824 * drm_universal_plane_alloc() - Allocate and initialize an universal plane object
829 * @funcs: callbacks for the new plane
834 * @plane_type: type of plane (overlay, primary, cursor)
835 * @name: printf style format string for the plane name, or NULL for default name
837 * Allocates and initializes a plane object of type @type. The caller
843 * @format_modifiers to NULL. The plane will advertise the linear modifier.
846 * Pointer to new plane, or ERR_PTR on failure.
857 * drm_plane_index - find the index of a registered plane
858 * @plane: plane to find index for
860 * Given a registered plane, return the index of that plane within a DRM
863 static inline unsigned int drm_plane_index(const struct drm_plane *plane) in drm_plane_index() argument
865 return plane->index; in drm_plane_index()
869 * drm_plane_mask - find the mask of a registered plane
870 * @plane: plane to find mask for
872 static inline u32 drm_plane_mask(const struct drm_plane *plane) in drm_plane_mask() argument
874 return 1 << drm_plane_index(plane); in drm_plane_mask()
878 void drm_plane_force_disable(struct drm_plane *plane);
880 int drm_mode_plane_set_obj_prop(struct drm_plane *plane,
888 * @id: plane id
890 * Returns the plane with @id, NULL if it doesn't exist. Simple wrapper around
904 * @plane: the loop cursor
906 * @plane_mask: bitmask of plane indices
910 #define drm_for_each_plane_mask(plane, dev, plane_mask) \ argument
911 list_for_each_entry((plane), &(dev)->mode_config.plane_list, head) \
912 for_each_if ((plane_mask) & drm_plane_mask(plane))
916 * @plane: the loop cursor
921 * universal plane aware. See also &enum drm_plane_type.
923 #define drm_for_each_legacy_plane(plane, dev) \ argument
924 list_for_each_entry(plane, &(dev)->mode_config.plane_list, head) \
925 for_each_if (plane->type == DRM_PLANE_TYPE_OVERLAY)
929 * @plane: the loop cursor
934 #define drm_for_each_plane(plane, dev) \ argument
935 list_for_each_entry(plane, &(dev)->mode_config.plane_list, head)
940 void drm_plane_enable_fb_damage_clips(struct drm_plane *plane);
946 int drm_plane_create_scaling_filter_property(struct drm_plane *plane,