STRUCT NOUVEAU_I2C_ENCODER_FUNCS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct nouveau_i2c_encoder_funcs(9) πŸŽ€

okay bestie, welcome to the Kernel API Manual β€” this is the page for struct nouveau_i2c_encoder_funcs, and it's basically the lil' contact list of entry points that an I2C encoder driver exposes. think of it as the encoder driver's group chat bio. no cap. ✨


🌸 NAME 🌸

struct nouveau_i2c_encoder_funcs β€” the entry points exposed by an I2C encoder driver. literally that's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

struct nouveau_i2c_encoder_funcs {
    void (*set_config)(struct drm_encoder *encoder, void *params);
    void (*destroy)(struct drm_encoder *encoder);
    void (*dpms)(struct drm_encoder *encoder, int mode);
    void (*save)(struct drm_encoder *encoder);
    void (*restore)(struct drm_encoder *encoder);
    bool (*mode_fixup)(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode);
    int (*mode_valid)(struct drm_encoder *encoder, const struct drm_display_mode *mode);
    void (*mode_set)(struct drm_encoder *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode);
    enum drm_connector_status (*detect)(struct drm_encoder *encoder, struct drm_connector *connector);
    int (*get_modes)(struct drm_encoder *encoder, struct drm_connector *connector);
    int (*create_resources)(struct drm_encoder *encoder, struct drm_connector *connector);
    int (*set_property)(struct drm_encoder *encoder, struct drm_connector *connector, struct drm_property *property, uint64_t val);
};

every single one of those function pointers is a whole personality, and we're gonna meet them one by one. πŸ’–


🫢 Members 🫢

  • set_config β€” initialize any encoder-specific modesetting parameters. the meaning of the params parameter is implementation dependent, so don't come at me asking what it should be β€” it's usually a structure with DVO port data format settings or timings. also, plot twist: it's not required for the new parameters to take effect until the next mode is set. ikyk. 🌈
  • destroy β€” analogous to the drm_encoder_funcs destroy callback. it's the goodbye-homie callback. πŸ‘‹
  • dpms β€” analogous to the drm_encoder_helper_funcs dpms callback.
  • save β€” save state. wrapped by nouveau_i2c_encoder_save. bestie it's literally getting saved, like a draft before you close the app πŸ’€
  • restore β€” restore state. wrapped by nouveau_i2c_encoder_restore. the comeback arc. πŸ‘‘
  • mode_fixup β€” analogous to the drm_encoder_helper_funcs mode_fixup callback. wrapped by nouveau_i2c_encoder_mode_fixup.
  • mode_valid β€” analogous to drm_encoder_helper_funcs mode_valid. vibe check for modes, honestly. ⭐
  • mode_set β€” analogous to the drm_encoder_helper_funcs mode_set callback.
  • detect β€” analogous to the drm_encoder_helper_funcs detect callback. wrapped by nouveau_i2c_encoder_detect. she's nosy and she's good at it πŸ”₯
  • get_modes β€” get modes.
  • create_resources β€” create resources.
  • set_property β€” set property.

πŸ¦‹ Description πŸ¦‹

so most of its members are analogous to the function pointers in drm_encoder_helper_funcs, and they can optionally be used to initialize the latter. optional!! no pressure, we love a flexible queen. πŸ’œ

connector-like methods (e.g. get_modes and set_property) will typically be wrapped around and only be called if the encoder is the currently selected one for the connector. so bestie, if you're not the chosen one for that connector, you simply do not get called. not me being dramatic about it, that's just the rules 😭


πŸŽ€ SEE ALSO πŸŽ€


ok and one lil' heads-up bestie: this page lives at ./drivers/gpu/drm/nouveau/incl... (yes, truncated, she's mysterious like that), and it's dated October 2026 β€” the footer also reads struct nouve...ncoder_funcs(9), so. yeah. slay. πŸ’…πŸŒΈ

anyway that's the whole page, go forth and initialize those function pointers, ily, bye πŸ«Άβœ¨πŸ’–

πŸ“¦ where this page comes from