Skip to content

Commit ade0e67

Browse files
leandrohrbemersion
authored andcommitted
drm/doc: document drm_mode_get_plane
Add a small description and document struct fields of drm_mode_get_plane. Signed-off-by: Leandro Ribeiro <[email protected]> Reviewed-by: Pekka Paalanen <[email protected]> Signed-off-by: Simon Ser <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent bfd616f commit ade0e67

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

include/uapi/drm/drm_mode.h

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,16 +312,48 @@ struct drm_mode_set_plane {
312312
__u32 src_w;
313313
};
314314

315+
/**
316+
* struct drm_mode_get_plane - Get plane metadata.
317+
*
318+
* Userspace can perform a GETPLANE ioctl to retrieve information about a
319+
* plane.
320+
*
321+
* To retrieve the number of formats supported, set @count_format_types to zero
322+
* and call the ioctl. @count_format_types will be updated with the value.
323+
*
324+
* To retrieve these formats, allocate an array with the memory needed to store
325+
* @count_format_types formats. Point @format_type_ptr to this array and call
326+
* the ioctl again (with @count_format_types still set to the value returned in
327+
* the first ioctl call).
328+
*/
315329
struct drm_mode_get_plane {
330+
/**
331+
* @plane_id: Object ID of the plane whose information should be
332+
* retrieved. Set by caller.
333+
*/
316334
__u32 plane_id;
317335

336+
/** @crtc_id: Object ID of the current CRTC. */
318337
__u32 crtc_id;
338+
/** @fb_id: Object ID of the current fb. */
319339
__u32 fb_id;
320340

341+
/**
342+
* @possible_crtcs: Bitmask of CRTC's compatible with the plane. CRTC's
343+
* are created and they receive an index, which corresponds to their
344+
* position in the bitmask. Bit N corresponds to
345+
* :ref:`CRTC index<crtc_index>` N.
346+
*/
321347
__u32 possible_crtcs;
348+
/** @gamma_size: Never used. */
322349
__u32 gamma_size;
323350

351+
/** @count_format_types: Number of formats. */
324352
__u32 count_format_types;
353+
/**
354+
* @format_type_ptr: Pointer to ``__u32`` array of formats that are
355+
* supported by the plane. These formats do not require modifiers.
356+
*/
325357
__u64 format_type_ptr;
326358
};
327359

0 commit comments

Comments
 (0)