drm_fb_xrgb8888_to_abgr8888(9)
β¨ drm_fb_xrgb8888_to_abgr8888(9) β¨
okay so bestie, this is a page from the Kernel API Manual, and it's literally about converting XRGB8888 into ABGR8888 in a clip buffer. it's giving "I make your pixels match your screen" energy and honestly? iconic. π
πΈ NAME πΈ
drm_fb_xrgb8888_to_abgr8888 β convert XRGB8888 to ABGR8888 clip buffer</p> π
π¦ SYNOPSIS π¦
void drm_fb_xrgb8888_to_abgr8888 (struct iosys_map *dst , const unsigned
int *dst_pitch , const struct iosys_map *src , const struct
drm_framebuffer *fb , const struct drm_rect *clip , struct
drm_format_conv_state *state );
like literally just call it with all six of those and you're slaying β¨
π ARGUMENTS π
dstβ array of ABGR8888 destination buffers. yes, array, plural, we're fancy here πdst_pitchβ array of numbers of bytes between the start of two consecutive scanlines withindst. it can beNULLif the scanlines are stored right next to each other (bestie behavior fr fr) π«Άsrcβ array of XRGB8888 source buffer πfbβ DRM framebuffer, the main character tbh πclipβ clip rectangle area to copy βοΈstateβ transform and conversion state β¨
π DESCRIPTION π
so what this function does is copy parts of a framebuffer to display memory, and it converts the color format during the process. multitasking queen π
the parameters dst, dst_pitch and src refer to arrays. each array must have at least as many entries as there are planes in fb's format. each entry stores the value for the format's respective color plane at the same index β like little matching bestie slots π
β οΈ heads up: this function does not apply clipping on dst β meaning the destination is at the top-left corner. no cap, that's just how it is π
drivers can use this function for ABGR8888 devices that don't support XRGB8888 natively. it sets an opaque alpha channel as part of the conversion, so your transparency is fully handled, periodt π
β SEE ALSO β
- kernel file
./drivers/gpu/drm/drm_format_helper.cπ 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_clip_offset(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_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)
like a whole friend group of conversion functions, and every single one of them ate π₯
and that's the whole page, bestie!! this one came from ./drivers/gpu/drm and it's dated October 2026 β manifesting good vibes and correctly-converted pixels for you forever π§π byeee!! π¦
π¦ 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