include/uapi/drm/drm_mode.h
Source file repositories/reference/linux-study-clean/include/uapi/drm/drm_mode.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/drm/drm_mode.h- Extension
.h- Size
- 49986 bytes
- Lines
- 1620
- Domain
- Repository Root And Misc
- Bucket
- include
- Inferred role
- Repository Root And Misc: implementation source
- Status
- source implementation candidate
Why This File Exists
Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Top-level or miscellaneous repository surface. Use this as map coverage unless a later manual pass promotes the file into a deeper subsystem dossier.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bits.hlinux/const.hdrm.h
Detected Declarations
struct drm_mode_modeinfostruct drm_mode_card_resstruct drm_mode_crtcstruct drm_mode_set_planestruct drm_mode_get_planestruct drm_mode_get_plane_resstruct drm_mode_get_encoderstruct drm_mode_get_connectorstruct drm_mode_property_enumstruct drm_mode_get_propertystruct drm_mode_connector_set_propertystruct drm_mode_obj_get_propertiesstruct drm_mode_obj_set_propertystruct drm_mode_get_blobstruct drm_mode_fb_cmdstruct drm_mode_fb_cmd2struct drm_mode_fb_dirty_cmdstruct drm_mode_mode_cmdstruct drm_mode_cursorstruct drm_mode_cursor2struct drm_mode_crtc_lutstruct drm_color_ctmstruct drm_color_ctm_3x4struct drm_color_lutstruct drm_color_lut32struct drm_plane_size_hintstruct hdr_metadata_infoframestruct hdr_output_metadatastruct drm_mode_crtc_page_flipstruct drm_mode_crtc_page_flip_targetstruct drm_mode_create_dumbstruct drm_mode_map_dumbstruct drm_mode_destroy_dumbstruct drm_mode_atomicstruct drm_format_modifier_blobstruct drm_format_modifierstruct drm_mode_create_blobstruct drm_mode_destroy_blobstruct drm_mode_create_leasestruct drm_mode_list_lesseesstruct drm_mode_get_leasestruct drm_mode_revoke_leasestruct drm_mode_rectstruct drm_mode_closefbenum drm_mode_subconnectorenum drm_colorop_typeenum drm_colorop_lut3d_interpolation_typeenum drm_colorop_lut1d_interpolation_type
Annotated Snippet
struct drm_mode_modeinfo {
__u32 clock;
__u16 hdisplay;
__u16 hsync_start;
__u16 hsync_end;
__u16 htotal;
__u16 hskew;
__u16 vdisplay;
__u16 vsync_start;
__u16 vsync_end;
__u16 vtotal;
__u16 vscan;
__u32 vrefresh;
__u32 flags;
__u32 type;
char name[DRM_DISPLAY_MODE_LEN];
};
struct drm_mode_card_res {
__u64 fb_id_ptr;
__u64 crtc_id_ptr;
__u64 connector_id_ptr;
__u64 encoder_id_ptr;
__u32 count_fbs;
__u32 count_crtcs;
__u32 count_connectors;
__u32 count_encoders;
__u32 min_width;
__u32 max_width;
__u32 min_height;
__u32 max_height;
};
struct drm_mode_crtc {
__u64 set_connectors_ptr;
__u32 count_connectors;
__u32 crtc_id; /**< Id */
__u32 fb_id; /**< Id of framebuffer */
__u32 x; /**< x Position on the framebuffer */
__u32 y; /**< y Position on the framebuffer */
__u32 gamma_size;
__u32 mode_valid;
struct drm_mode_modeinfo mode;
};
#define DRM_MODE_PRESENT_TOP_FIELD (1<<0)
#define DRM_MODE_PRESENT_BOTTOM_FIELD (1<<1)
/* Planes blend with or override other bits on the CRTC */
struct drm_mode_set_plane {
__u32 plane_id;
__u32 crtc_id;
__u32 fb_id; /* fb object contains surface format type */
__u32 flags; /* see above flags */
/* Signed dest location allows it to be partially off screen */
__s32 crtc_x;
__s32 crtc_y;
__u32 crtc_w;
__u32 crtc_h;
/* Source values are 16.16 fixed point */
__u32 src_x;
__u32 src_y;
__u32 src_h;
__u32 src_w;
};
/**
* struct drm_mode_get_plane - Get plane metadata.
*
* Userspace can perform a GETPLANE ioctl to retrieve information about a
* plane.
*
* To retrieve the number of formats supported, set @count_format_types to zero
* and call the ioctl. @count_format_types will be updated with the value.
*
* To retrieve these formats, allocate an array with the memory needed to store
* @count_format_types formats. Point @format_type_ptr to this array and call
* the ioctl again (with @count_format_types still set to the value returned in
* the first ioctl call).
*/
struct drm_mode_get_plane {
/**
* @plane_id: Object ID of the plane whose information should be
Annotation
- Immediate include surface: `linux/bits.h`, `linux/const.h`, `drm.h`.
- Detected declarations: `struct drm_mode_modeinfo`, `struct drm_mode_card_res`, `struct drm_mode_crtc`, `struct drm_mode_set_plane`, `struct drm_mode_get_plane`, `struct drm_mode_get_plane_res`, `struct drm_mode_get_encoder`, `struct drm_mode_get_connector`, `struct drm_mode_property_enum`, `struct drm_mode_get_property`.
- Atlas domain: Repository Root And Misc / include.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.