packed_pixels_addr(9)
π packed_pixels_addr β Kernel API Manual (section 9, bestie)
okay so this is packed_pixels_addr from the Kernel API Manual, section 9, and we're gonna get through it together, no cap π
β¨ NAME β¨
packed_pixels_addr β the function that hands you the pointer to the block containing the pixel at the coordinates you asked for π―
β¨ SYNOPSIS β¨
void packed_pixels_addr (const struct vkms_frame_info *frame_info , int
x , int y , int plane_index , u8 **addr , int *rem_x , int *rem_y );
π ARGUMENTS π
frame_infoβ the buffer metadata, like the vibe check for your whole buffer π«Άxβ the x (width) coordinate inside the planeyβ the y (height) coordinate inside the planeplane_indexβ which plane we're on, the index of it πaddrβ the returned pointer, this is where the answer lands β¨rem_xβ the returned X coordinate of the requested pixel in the blockrem_yβ the returned Y coordinate of the requested pixel in the block
πΈ DESCRIPTION πΈ
So it takes everything stored in the frame_info, plus a pair of coordinates, and it returns two things: the address of the block that contains this pixel, and the pixel's position inside that block. literally two-for-one, we love a multitasker π
For the deets on how rem_x/rem_y actually behave, go check packed_pixels_offset β it's giving "read that one next" π
π¦ SEE ALSO π¦
Kernel file ./drivers/gpu/drm/vkms/vkms_formats.c β that's the one, the source file, iykyk ποΈ
packed_pixels_offset(9)get_block_step_bytes(9)packed_pixels_addr_1x1(9)get_subsampling(9)get_subsampling_offset(9)READ_LINE(9)READ_LINE_ARGB8888(9)READ_LINE_le16161616(9)READ_LINE_YUV_SEMIPLANAR(9)vkms_writeback_row(9)get_pixel_read_line_function(9)swap_uv_columns(9)get_conversion_matrix_to_argb_u16(9)get_pixel_write_function(9)
and that's the whole page, bestie, you ate that π this lil masterpiece lives in ./drivers/gpu/drm/vkms, dated October 2026, and it is, of course, packed_pixels_addr(9) β mwah πβ¨
π¦ 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