__drm_writeb...nnector_init(9)
π __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 theformatsarray. 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 π¦
- Kernel file
./drivers/gpu/drm/drm_writeback.coverview(9) drm_writeback_connector_init(9)drm_writeback_connector_init_with_encoder(9)drm_writeback_connector_cleanup(9)β yes you will need this one eventually π§drmm_writeback_connector_init(9)drm_writeback_queue_job(9)drm_writeback_signal_completion(9)
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
- 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