drm_rect_equals(9)
π drm_rect_equals β bestie, are these two rectangles literally the same??
okay so this one's from the Kernel API Manual, page drm_rect_equals(9), and it's genuinely one of the most chill functions in the whole DRM situation. no cap. it's a vibe check for rectangles. π
β¨ NAME β¨
drm_rect_equals β determine if two rectangles are equal π«Ά
like⦠that's it. that's the whole job. it looks at two rectangles and tells you if they're twins or not. iconic behavior honestly.
πΈ SYNOPSIS πΈ
bool drm_rect_equals (const struct drm_rect *r1 , const struct drm_rect *r2 );
so yeah, it takes two pointers β r1 and r2 β both const struct drm_rect * (const!! it's not gonna touch them, it's a respectful king π), and it hands you back a bool. that's the tea. π
π¦ ARGUMENTS π¦
r1β first rectangle π (the first one. the OG. the main character of the pair.)r2β second rectangle π (the other one. also important! don't dor2dirty.)
β RETURN β
true if the rectangles are equal, false otherwise.
that's it. no weird edge cases in the docs, no surprise -1, no errno shenanigans. just yes or no. slay. π₯
lowkey the most refreshing return contract ever β it's giving "I know what I am" energy.
π SEE ALSO π
okay this is where it gets stacked, bestie. the whole rect squad shows up. literally the entire friend group:
- Kernel file
./include/drm/drm_rect.h - rect utils(9)
- struct drm_rect(9)
- DRM_RECT_INIT(9)
- DRM_RECT_FMT(9)
- DRM_RECT_ARG(9)
- DRM_RECT_FP_FMT(9)
- DRM_RECT_FP_ARG(9)
- drm_rect_init(9)
- drm_rect_adjust_size(9)
- drm_rect_translate(9)
- drm_rect_translate_to(9)
- drm_rect_downscale(9)
- drm_rect_width(9)
- drm_rect_height(9)
- drm_rect_visible(9)
- drm_rect_fp_to_int(9)
- drm_rect_overlap(9)
likeβ¦ the way drm_rect_overlap(9) is right there at the end, the natural sequel. iykyk. π
and that's the page!! written in the ./include/drm era, dated October 2026, and if you ever forget the name it's literally drm_rect_equals(9) β same as the top, same as the bottom, because this function is nothing if not consistent. 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