xe_guc_klv_parser(9)
โจ xe_guc_klv_parser(9) โจ
okay so this is a page from the Kernel API Manual, and today's main character is xe_guc_klv_parser ๐
๐ NAME ๐
xe_guc_klv_parser โ bestie, it parses and decodes a whole stream of KLVs. that's it. that's the job. no cap. ๐
๐ธ SYNOPSIS ๐ธ
int xe_guc_klv_parser (const u32 *klvs , u32 num_dwords , void *obj ,
int (*decoder)(void *obj, u16 key, u16 len, const u32 *value) );
likeโฆ look at that signature. it's giving "i take my callback responsibilities very seriously" ๐ฅ
๐ฆ ARGUMENTS ๐ฆ
klvsโ the buffer that's holding all your KLVs, bestie. that's the whole vibe right there.num_dwordsโ how many dwords (u32, literally u32) you actually have available in that buffer. don't be out here lying about it. ๐objโ an opaque pointer that just gets handed off to the decoder function. it's very "you don't need to know me, i'm just here for the callback" โจdecoderโ pointer to the decoder function itself. the callback. the icon. the one doing the actual decoding work. ๐
โญ RETURN โญ
so what do you get back? it returns the sum of all the results returned by the decoder โ like, it literally adds them all up, obsessed ๐ โ or, if things go sideways, an -errno on a decoder failure or a buffer failure ๐ญ
lowkey important: it's a sum, not just the last one. maths is happening. respect it. ๐งฎ
๐ SEE ALSO ๐
- the kernel file it lives in:
./drivers/gpu/drm/xe/xe_guc_klv_helpers.c xe_guc_klv_key_to_string(9)xe_guc_klv_print_one(9)xe_guc_klv_print(9)xe_guc_klv_count(9)xe_guc_klv_encode_u32(9)xe_guc_klv_encode_u64(9)xe_guc_klv_encode_string(9)xe_guc_klv_encode_object(9)
fr fr go read all of them, they're the whole friend group ๐ซถ
okay that's the page!! sourced from the ./drivers/gpu/drm/xe directory, dated October 2026, and it's xe_guc_klv_parser(9) โ slay, bye bestie ๐๐โญ
๐ฆ 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