drm_writeba...with_encoder(9)
β¨ drm_writeba...with_encoder(9) β¨
okay so bestie, welcome to the Kernel API Manual page for drm_writeba...with_encoder(9) β literally the longest function name in the DRM cinematic universe and we're gonna get through it together π«Ά
πΈ NAME πΈ
drm_writeback_connector_init_with_encoder β initializes a writeback connector, but likeβ¦ with a custom encoder. you bring your own encoder, she brings the connector. it's giving collaboration π
π SYNOPSIS π
int drm_writeback_connector_init_with_encoder (struct drm_device *dev ,
struct drm_writeback_connector *wb_connector , struct drm_encoder *enc ,
const struct drm_connector_funcs *con_funcs , const u32 *formats , int
n_formats );
π¦ ARGUMENTS π¦
devβ the DRM device. the main character of the whole operation tbh.wb_connectorβ the writeback connector you want to initialize. she's getting her glow-up right here β¨encβ a handle to the drm encoder that's already initialized. not new. pre-owned. vintage, even πcon_funcsβ the connector funcs vtable. all the little function pointers that tell the connector how to behave.formatsβ an array of the pixel formats your writeback engine supports. the whole menu πn_formatsβ length of theformatsarray. like, how many items are actually on that menu.
π DESCRIPTION π
so what does she actually do? okay so:
This function creates the writeback-connector-specific properties if they haven't already been created, initializes the connector as type DRM_MODE_CONNECTOR_WRITEBACK, and correctly initializes the property values. no cap, that's the whole vibe check.
β οΈ important assumption alert β οΈ this function assumes that the drm_writeback_connector's encoder has already been created and initialized before you invoke this function. do not come in here with a half-baked encoder, she will not fix that for you π
In addition, this function also assumes that callers of this API will manage assigning the encoder helper functions, possible_crtcs and any other encoder specific operation. yes bestie, that's on you. main character responsibilities π₯
Drivers should always use this function instead of drm_connector_init to set up writeback connectors if they want to manage themselves the lifetime of the associated encoder. like, always. periodt. π
π RETURN π
0 on success, or a negative error code. so if you get something negative back, that's your villain origin story and you should go debug it π
β SEE ALSO β
go read these next, iykyk:
- Kernel file
./drivers/gpu/drm/drm_writeback.coverview(9) drm_writeback_connector_init(9)__drm_writeback_connector_init(9)drm_writeback_connector_cleanup(9)drmm_writeback_connector_init(9)drm_writeback_queue_job(9)drm_writeback_signal_completion(9)
and that's the page, bestie π§π this lil masterpiece lives in ./drivers/gpu/drm, dated October 2026, and it's filed under drm_writeba...with_encoder(9) in the Kernel API Manual β slay, go write some writeback connectors π
β¨
π¦ 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