STRUCT DRM_MODE_RECT(9)
β¨ struct drm_mode_rect(9) β¨
okay so bestie, welcome to the struct drm_mode_rect page from the Kernel API Manual π β yes it's a manual page, yes it's about a rectangle, and no, it's not boring, because this little guy is doing main character energy work in the DRM subsystem. Let's get into it π
πΈ NAME πΈ
struct drm_mode_rect β a two dimensional rectangle, fr fr πͺ
β¨ SYNOPSIS β¨
struct drm_mode_rect {
__s32 x1;
__s32 y1;
__s32 x2;
__s32 y2;
};
like, that's the whole thing. four __s32s. iconic minimalism π
π¦ Members π¦
x1β the horizontal starting coordinate, and it's inclusive β so yes, this one counts π«Άy1β the vertical starting coordinate, also inclusive πx2β the horizontal ending coordinate, but this one is exclusive β she's not included, boundaries babe πy2β the vertical ending coordinate, also exclusive β same deal, not counted π
ngl the inclusive/exclusive thing is the kind of detail that will bite you if you forget it, so likeβ¦ don't forget it π
π Description π
So the drm subsystem uses struct drm_rect to manage rectangular areas internally, and this struct, struct drm_mode_rect, is how they export it to user-space πβ¨
Currently it's used by the drm_mode_atomic blob property FB_DAMAGE_CLIPS. That's it, that's the tea π
π SEE ALSO π
okay this list is long, so buckle up bestie β literally every one of these is coming with us, no skips π
- Kernel file
./include/uapi/drm/drm_mode.hoverview(9) π struct drm_mode_modeinfo(9)struct drm_mode_get_plane(9)struct drm_mode_get_connector(9)struct drm_mode_property_enum(9)struct drm_mode_get_property(9)struct drm_mode_fb_cmd2(9)enum drm_colorop_type(9)enum drm_colorop_lut3d_interpolation_type(9)enum drm_colorop_lut1d_interpolation_type(9)struct drm_plane_size_hint(9)struct hdr_metadata_infoframe(9)struct hdr_output_metadata(9)DRM_MODE_PAGE_FLIP_EVENT(9)DRM_MODE_PAGE_FLIP_ASYNC(9)DRM_MODE_PAGE_FLIP_FLAGS(9)struct drm_mode_create_dumb(9)DRM_MODE_ATOMIC_TEST_ONLY(9)DRM_MODE_ATOMIC_NONBLOCK(9)DRM_MODE_ATOMIC_ALLOW_MODESET(9)DRM_MODE_ATOMIC_FLAGS(9)struct drm_mode_create_blob(9)struct drm_mode_destroy_blob(9)struct drm_mode_create_lease(9)struct drm_mode_list_lessees(9)struct drm_mode_get_lease(9)struct drm_mode_revoke_lease(9)struct drm_mode_closefb(9)
likeβ¦ go read them, iykyk π€π
and that's the whole page, bestie! this one lives in ./include/uapi/drm and the version/date on the tin is October 2026 β so yeah, future vibes only π¦β¨ go forth and draw your inclusive-inclusive-exclusive-exclusive rectangles, periodt π
π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms