drm_fb_xrgb8888_to_bgrx8888(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 drm_fb_xrgb8888_to_bgrx8888 β€” Kernel API Manual ✨

Hey bestie, welcome to the drm_fb_xrgb8888_to_bgrx8888(9) page πŸ’… this is the DRM format-helper that takes your pixels from XRGB8888 and serves them up as BGRX8888, no cap. It lives in the Kernel API Manual, it's giving "quiet little helper, extremely important job," and we're gonna go through it together 🫢


πŸŽ€ NAME πŸŽ€

drm_fb_xrgb8888_to_bgrx8888 β€” ok so this one converts XRGB8888 to a BGRX8888 clip buffer. That's literally the whole thing, iconic.


✨ SYNOPSIS ✨

void drm_fb_xrgb8888_to_bgrx8888 (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 );

πŸ’– ARGUMENTS πŸ’–

  • dst β€” the array of BGRX8888 destination buffers. This is where the glow-up happens πŸ¦‹
  • dst_pitch β€” array of numbers of bytes between the start of two consecutive scanlines within dst. Can be NULL if scanlines are stored right next to each other (snuggled up, bestie πŸ₯Ί).
  • src β€” array of XRGB8888 source buffer. The original, the blueprint, the before-photo.
  • fb β€” the DRM framebuffer. Main character energy, obviously πŸ‘‘
  • clip β€” clip rectangle area to copy. This is the boundary, the rules, the "stay in your lane but make it fashion" πŸ’…
  • state β€” transform and conversion state. The vibes-and-math holder.

🌈 DESCRIPTION 🌈

So, what does this do? It copies parts of a framebuffer to display memory and converts the color format during the process. Like, it's multitasking β€” copying and converting, and honestly? Obsessed 😭

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. So like β€” index matching, plane matching, everything lined up in its correct spot ✨ fr fr no chaos allowed.

Heads up bestie 🚨 this function does not apply clipping on dst β€” meaning the destination sits at the top-left corner. It's not gonna scoot itself over for you. That's your job.

Drivers can use this function for BGRX8888 devices that don't support XRGB8888 natively. So if your hardware is out here being picky about pixel order, this helper's got you 🫢


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/gpu/drm/drm_format_helper.c β€” the whole ecosystem lives here 🧚

A whole format-conversion friend group, and every single one of them ate πŸ”₯


That's the page bestie! πŸ’œ Sourced from ./drivers/gpu/drm, dated October 2026, and filed under drm_fb_xrgb8888_to_bgrx8888(9) β€” go forth and convert those pixels βœ¨πŸŽ€πŸ’–

πŸ“¦ where this page comes from