drm_fb_xrgb8888_to_rgb565(9)
π 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 withindst; can beNULLif 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: β¨
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_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_xbgr8888(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 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
- 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