Commit 7e5d1e12 authored by Simon Ser's avatar Simon Ser

drm/doc: fix drm_plane_type docs

The docs for enum drm_plane_type mention legacy IOCTLs, however the
plane type is not tied to legacy IOCTLs, the drm_cursor.primary and
cursor fields are. Add a small paragraph to reference these.

Instead, document expectations for primary and cursor planes for
non-legacy userspace. Note that these docs are for driver developers,
not userspace developers, so internal kernel APIs are mentionned.
Signed-off-by: default avatarSimon Ser <contact@emersion.fr>
Reviewed-by: default avatarDaniel Vetter <daniel@ffwll.ch>
Acked-by: default avatarPekka Paalanen <pekka.paalanen@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210115110626.12233-1-contact@emersion.fr
parent 25e524bf
...@@ -538,10 +538,14 @@ struct drm_plane_funcs { ...@@ -538,10 +538,14 @@ struct drm_plane_funcs {
* *
* For compatibility with legacy userspace, only overlay planes are made * For compatibility with legacy userspace, only overlay planes are made
* available to userspace by default. Userspace clients may set the * available to userspace by default. Userspace clients may set the
* DRM_CLIENT_CAP_UNIVERSAL_PLANES client capability bit to indicate that they * &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 * wish to receive a universal plane list containing all plane types. See also
* drm_for_each_legacy_plane(). * 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" * WARNING: The values of this enum is UABI since they're exposed in the "type"
* property. * property.
*/ */
...@@ -557,19 +561,20 @@ enum drm_plane_type { ...@@ -557,19 +561,20 @@ enum drm_plane_type {
/** /**
* @DRM_PLANE_TYPE_PRIMARY: * @DRM_PLANE_TYPE_PRIMARY:
* *
* Primary planes represent a "main" plane for a CRTC. Primary planes * A primary plane attached to a CRTC is the most likely to be able to
* are the planes operated upon by CRTC modesetting and flipping * light up the CRTC when no scaling/cropping is used and the plane
* operations described in the &drm_crtc_funcs.page_flip and * covers the whole CRTC.
* &drm_crtc_funcs.set_config hooks.
*/ */
DRM_PLANE_TYPE_PRIMARY, DRM_PLANE_TYPE_PRIMARY,
/** /**
* @DRM_PLANE_TYPE_CURSOR: * @DRM_PLANE_TYPE_CURSOR:
* *
* Cursor planes represent a "cursor" plane for a CRTC. Cursor planes * A cursor plane attached to a CRTC is more likely to be able to be
* are the planes operated upon by the DRM_IOCTL_MODE_CURSOR and * enabled when no scaling/cropping is used and the framebuffer has the
* DRM_IOCTL_MODE_CURSOR2 IOCTLs. * 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.
*/ */
DRM_PLANE_TYPE_CURSOR, DRM_PLANE_TYPE_CURSOR,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment