drm_fb_xrgb8888_to_rgb565(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ NAME πŸŽ€

Okay bestie, welcome to the Kernel API Manual page for drm_fb_xrgb8888_to_rgb565 β€” described as β€œConvert XRGB8888 to RGB565 clip buffer.” That’s the name, that’s the mission, and it’s lowkey iconic. πŸ’…βœ¨

✨ SYNOPSIS ✨

void drm_fb_xrgb8888_to_rgb565 (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 β€” Array of RGB565 destination buffers. That’s where the RGB565 glow-up lands. ✨
  • 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. Adjacent scanlines are valid, bestie. 🫢
  • src β€” Array of XRGB8888 source buffer. The original pixels before the conversion moment. πŸ’–
  • fb β€” DRM framebuffer. The main-character framebuffer in this whole situation. πŸ‘‘
  • clip β€” Clip rectangle area to copy. This is the region we’re copying. πŸŽ€
  • state β€” Transform and conversion state. Keep it close; it’s part of the process. πŸ¦‹

🌸 DESCRIPTION 🌸

This function copies parts of a framebuffer to display memory and converts the color format during the process. Destination and framebuffer formats must match β€” no cap, that’s a hard requirement. πŸ”₯

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. Very much a same-index situation, iykyk. 🧚

⚠️ This function does not apply clipping on dst (i.e. the destination is at the top-left corner). So the destination stays top-left, bestie. πŸ™ˆ

Drivers can use this function for RGB565 devices that don’t support XRGB8888 natively. It’s giving compatibility, and we love that for them. πŸ’–

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file: ./drivers/gpu/drm/drm_format_helper.c β€” the source file. Now the whole friend group: ✨


That’s the whole page, bestie 🫢. Footer tea, served cute: source/version ./drivers/gpu/drm, date October 2026, and it’s all for drm_fb_xrgb8888_to_rgb565(9). Bye πŸ’‹βœ¨

πŸ“¦ where this page comes from