drm_fb_clip_offset(9)
π drm_fb_clip_offset β the Kernel API Manual, bestie edition β¨
Okay so this one is a kernel API page (drm_fb_clip_offset(9), section 9, in case you were wondering π) and it's literally about one tiny but iconic job: figuring out the byte offset of your clipping rectangle inside a framebuffer. That's it, that's the whole vibe. Lowkey obsessed with how specific it is. π¦
β¨ NAME β¨
drm_fb_clip_offset β returns the clipping rectangle's byte-offset in a framebuffer π«Ά
πΈ SYNOPSIS πΈ
unsigned int drm_fb_clip_offset (unsigned int pitch , const struct
drm_format_info *format , const struct drm_rect *clip );
π ARGUMENTS π
pitchβ the framebuffer's line pitch, in bytes. Yes, bytes, not pixels, don't come for me πformatβ the framebuffer format, aka theconst struct drm_format_info *you're passing inclipβ the clip rectangle, aka theconst struct drm_rect *in question
π¦ RETURN π¦
It gives you back the byte offset of the clip rectangle's top-left corner within the framebuffer. That's the whole return value, no cap. β¨
π SEE ALSO π
First up, the kernel file itself lives right here:
./drivers/gpu/drm/drm_format_helper.cπ
And then the whole friend group, in order, because we do not skip anyone in this house π :
drm_format_conv_state_init(9)drm_format_conv_state_copy(9)drm_format_conv_state_reserve(9)drm_format_conv_state_release(9)drm_fb_memcpy(9)drm_fb_swab(9)drm_fb_xrgb8888_to_rgb332(9)drm_fb_xrgb8888_to_rgb565(9)drm_fb_xrgb8888_to_rgb565be(9)drm_fb_xrgb8888_to_xrgb1555(9)drm_fb_xrgb8888_to_argb1555(9)drm_fb_xrgb8888_to_rgba5551(9)drm_fb_xrgb8888_to_rgb888(9)drm_fb_xrgb8888_to_bgr888(9)drm_fb_xrgb8888_to_argb8888(9)drm_fb_xrgb8888_to_abgr8888(9)drm_fb_xrgb8888_to_xbgr8888(9)drm_fb_xrgb8888_to_bgrx8888(9)drm_fb_xrgb8888_to_xrgb2101010(9)drm_fb_xrgb8888_to_argb2101010(9)drm_fb_xrgb8888_to_gray8(9)drm_fb_argb8888_to_argb4444(9)drm_fb_xrgb8888_to_mono(9)drm_fb_xrgb8888_to_gray2(9)
Not me listing all 24 of these bad boys because every single reference deserves its moment π no skipping, periodt.
And that's the page, bestie! π Shoutout to the ./drivers/gpu/drm directory for hosting all this, dated October 2026 β go forth and clip those rectangles, you absolute main character πβ¨
π¦ 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