__drm_writeb...nnector_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __drm_writeback_connector_init(9) β€” from the Kernel API Manual, bestie ✨

okay so picture this: it's giving kernel-internal, it's giving writeback connectors, and you found the double-underscore version (iykyk πŸ‘€). This is the one where you bring your own encoder. Let's get into it πŸŽ€


🌸 NAME 🌸

__drm_writeback_connector_init β€” initialize a writeback connector with a custom encoder πŸ’–


✨ SYNOPSIS ✨

int __drm_writeback_connector_init (struct drm_device *dev,
                                    struct drm_writeback_connector *wb_connector,
                                    struct drm_encoder *enc,
                                    const u32 *formats,
                                    int n_formats);

🫢 ARGUMENTS 🫢

  • dev β€” the DRM device, the main character of this whole story 🌈
  • wb_connector β€” the writeback connector you're initializing. yes, that one. her. πŸ‘‘
  • enc β€” a handle to the already initialized drm encoder (key word: already β€” more on this in a sec 😭)
  • formats β€” an array of the supported pixel formats for the writeback engine 🎨
  • n_formats β€” the length of the formats array. literally just how many there are, no cap πŸ”’

πŸ’œ DESCRIPTION πŸ’œ

so what does this function actually do? glad you asked πŸ’…

It creates the writeback-connector-specific properties β€” but only if they haven't already been created (she's not gonna duplicate them, she's better than that ✨). Then it initializes the connector as type DRM_MODE_CONNECTOR_WRITEBACK, and correctly initializes the property values. slay.

⚠️ important vibe check: this function assumes that the drm_writeback_connector's encoder has already been created and initialized before you invoke this function. Like, that's your job, not hers. don't come in here with an un-initialized encoder, bestie πŸ™ˆ

In addition β€” and yes there's more β€” this function also assumes that callers of this API will manage assigning the encoder helper functions, possible_crtcs, and any other encoder-specific operation. So that's on you too. main character responsibility fr fr πŸ’€


πŸ”₯ RETURN πŸ”₯

0 on success, or a negative error code 😭 β€” so basically, check it. don't ignore the return value. she's telling you something.


πŸ¦‹ SEE ALSO πŸ¦‹


okay that's the whole page, you ate that πŸ’…βœ¨ go forth and initialize your writeback connectors responsibly, bestie πŸ«ΆπŸ’–

πŸŽ€ sign-off time: this icon of a manual page lives under ./drivers/gpu/drm and is dated October 2026 β€” periodt. πŸŒΈπŸ’œ
πŸ“¦ where this page comes from