drm_fb_xrgb8888_to_xbgr8888(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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 within dst. and listen: this can be NULL if 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:

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