drm_fb_xrgb8888_to_xbgr8888(9)
π drm_fb_xrgb8888_to_xbgr8888 β bestie, it's a kernel API manual page π
okay so picture this: you're deep in the kernel, in drm_fb_xrgb8888_to_xbgr8888(9) territory, and you need your pixels converted. no cap, this is the whole vibe. β¨
π NAME π
drm_fb_xrgb8888_to_xbgr8888 β it converts XRGB8888 into XBGR8888 in a clip buffer. that's it, that's the function, and she serves. π¦
β¨ SYNOPSIS β¨
void drm_fb_xrgb8888_to_xbgr8888 (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 );
look at her. six parameters. absolutely main character energy. π
πΈ ARGUMENTS πΈ
dstβ an array of XBGR8888 destination buffers. plural, bestie, it's an array fr fr.dst_pitchβ an array of numbers of bytes between the start of two consecutive scanlines withindst. and listen: this can beNULLif the scanlines are stored next to each other. lowkey convenient. πsrcβ an array of XRGB8888 source buffer. yes, array. we said what we said. πfbβ the DRM framebuffer. she's the whole reason we're here tbh.clipβ the clip rectangle area to copy. the boundaries. the limits. respect them. πstateβ transform and conversion state. carry it with you like a lil emotional support struct. π«Ά
π DESCRIPTION π
okay so here's what she does: this function copies parts of a framebuffer to display memory and converts the color format during the process. the way that it multi-tasks?? iconic. π₯
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. yes, same index. keep them matched up, no chaos please. β
π¨ important bestie alert: this function does not apply clipping on dst β like, the destination is at the top-left corner. so don't come for her about clipping on the destination side, that's just not what she does. π
and the actual use case?? drivers can use this function for XBGR8888 devices that don't support XRGB8888 natively. she's the workaround. she's the bridge. she ate. π
π¦ SEE ALSO π¦
the whole friend group, in order, no one left out:
- Kernel file
./drivers/gpu/drm/drm_format_helper.cβ the source file, iykyk 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_abgr8888(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)
that's the whole roster. squad goals honestly. πΈ
mwah π β this page lives in ./drivers/gpu/drm, dated October 2026, and yes the title is still drm_fb_xrgb8888_to_xbgr8888(9) because some things are eternal. bye bestie, go convert some pixels πβ¨
π¦ 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