STRUCT NOUVEAU_I2C_ENCODER(9)
π STRUCT NOUVEAU_I2C_ENCODER(9) π
okay bestie, buckle up, because this is a page from the Kernel API Manual β yes, the <pink>struct nouveau_i2c_encoder(9)</pink> one specifically β and it's actually kind of a slay once you get past the C syntax π
β¨ NAME β¨
struct nouveau_i2c_encoder β the I2C encoder struct, and yes she's exactly what she sounds like π
πΈ SYNOPSIS πΈ
bestie, here's the whole vibe, copy-pasted exactly because I would NEVER mess with your struct:
struct nouveau_i2c_encoder {
struct drm_encoder base;
const struct nouveau_i2c_encoder_funcs *encoder_i2c_funcs;
void *encoder_i2c_priv;
struct i2c_client *i2c_client;
};
look at her. four members. iconic. π
π¦ Members π¦
baseβ the DRM encoder object, like the main character she literally is πencoder_i2c_funcsβ the I2C encoder callbacks. her little entourage of function pointers β¨encoder_i2c_privβ the I2C encoder private data. lowkey her diary, nobody else's business πi2c_clientβ the corresponding I2C client structure. her plus-one π«Ά
π Description π
so here's the tea, and it's genuinely interesting ngl β
A nouveau_i2c_encoder lowkey has two sets of callbacks: encoder_i2c_funcs and the ones chilling inside base. and here's the thing bestie β the ones in encoder_i2c_funcs are never actually called by the common CRTC code π not once. they're not there to be called, they're just a convenience thing π
the whole point is splitting the encoder functions into two layers:
- an upper, GPU-specific layer π₯
- and a (hopefully) GPU-agnostic lower layer π
and because nothing in life is free, it's the GPU driver's responsibility to call the nouveau_i2c_encoder methods when appropriate. so like, nobody's gonna do it for you, bestie. that's your job now π«‘
also, nouveau_i2c_encoder_init provides a way to get an implementation of this whole thing. that's your entry point, iykyk β
π SEE ALSO π
go look at these, fr fr:
- the kernel file
./drivers/gpu/drm/nouveau/include/dispnv04/i2c/encoder_i2c.h struct nouveau_i2c_encoder_funcs(9)struct nouveau_i2c_encoder_driver(9)nouveau_i2c_encoder_get_client(9)nouveau_i2c_encoder_destroy(9)
ngl the source attribution got cut off in the footer β all that survives is./drivers/gpu/drm/nouveau/incl...β but it's dated October 2026 and it's from thestruct nouveau_i2c_encoder(9)page in the Kernel API Manual, so jot that down bestie π
and that's the whole page, periodt π β¨ tysm for reading, go forth and call your encoder methods responsibly, 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