drm_fb_xrgb8888_to_xrgb1555(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ drm_fb_xrgb8888_to_xrgb1555 ✨

okay so bestie, welcome to the Kernel API Manual (section 9, we stay fancy), where today's main character is a little function called drm_fb_xrgb8888_to_xrgb1555 and honestly? she serves. πŸŽ€


🌸 NAME 🌸

drm_fb_xrgb8888_to_xrgb1555 β€” Convert XRGB8888 to XRGB1555 clip buffer πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

void drm_fb_xrgb8888_to_xrgb1555 (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, that's the whole signature, no cap. six params, zero drama (ok maybe a little drama). 🌈


πŸ’– ARGUMENTS πŸ’–

  • dst β€” Array of XRGB1555 destination buffers. it's an array, bestie, not a single buffer, don't come for me 🫢
  • dst_pitch β€” Array of numbers of bytes between the start of two consecutive scanlines within dst. can be NULL if scanlines are stored next to each other (they're snug like that, it's giving cozy 🧚).
  • src β€” Array of XRGB8888 source buffer. the glow-up starting point ✨
  • fb β€” DRM framebuffer. the moment. the icon. πŸ”₯
  • clip β€” Clip rectangle area to copy. this is the region we're actually touching.
  • state β€” Transform and conversion state. she holds the vibes (and the conversion settings, lowkey both) πŸ’œ

πŸ‘‘ DESCRIPTION πŸ‘‘

So here's the tea: this function copies parts of a framebuffer to display memory and converts the color format during the process. one function, two jobs, main character energy fr fr. πŸ’€

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 0 goes with index 0, index 1 with index 1 β€” everybody matched up, we love a coordinated group chat πŸŽ€.

heads up bestie: this function does not apply clipping on dst β€” the destination is at the top-left corner. no shifting, no sliding, she's already where she needs to be πŸ’…

Drivers can use this function for XRGB1555 devices that don't support XRGB8888 natively. like, if your hardware can't speak fluent XRGB8888, this is the translator. iconic behavior honestly.


πŸ“ SEE ALSO πŸ“

Kernel file ./drivers/gpu/drm/drm_format_helper.c β€” the whole friend group lives here 🫢

all of them. every single one. the whole conversion cinematic universe 🌈⭐


and that's the page bestie!! πŸ’– this came straight out of ./drivers/gpu/drm, dated October 2026, and it goes by drm_fb_xrgb8888_to_xrgb1555(9) β€” remember her name, she's gonna be on the test πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from