drm_writeba...with_encoder(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 the formats array. 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:


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