drm_crtc_helper_set_config(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_crtc_helper_set_config(9) πŸ’…

okay so this is the Kernel API Manual page for drm_crtc_helper_set_config(9), and bestie, we are getting into legacy CRTC helper business ✨

🌸 NAME 🌸

drm_crtc_helper_set_config β€” set a new config from userspace

✨ SYNOPSIS ✨

int drm_crtc_helper_set_config (struct drm_mode_set *set , struct
       drm_modeset_acquire_ctx *ctx );

πŸŒ€ ARGUMENTS πŸŒ€

  • set β€” mode set configuration
  • ctx β€” lock acquire context, not used here β€” literally just vibing in the parameter list 🫢

πŸ’– DESCRIPTION πŸ’–

okay so drm_crtc_helper_set_config is the helper function that implements the drm_crtc_funcs.set_config callback for drivers using the legacy CRTC helpers. It's giving legacy-era main character energy, iykyk πŸ’…

First thing it does: it tries to locate the best encoder for each connector by calling the connector drm_connector_helper_funcs.best_encoder helper operation. Bestie matching service, but for encoders ✨

After locating the appropriate encoders, the helper function calls the mode_fixup encoder and CRTC helper operations to adjust the requested mode β€” or reject it completely. If it rejects it, an error gets returned to the application. Rude, but valid πŸ’€

If the new configuration after mode adjustment is identical to the current configuration, the helper function returns without performing any other operation. Literally β€œsame vibe, bye” πŸ¦‹

If the adjusted mode is identical to the current mode but changes to the frame buffer need to be applied, drm_crtc_helper_set_config calls the CRTC drm_crtc_helper_funcs.mode_set_base helper operation. So: same mode, but frame buffer updates? It hits mode_set_base πŸŽ€

If the adjusted mode differs from the current mode, or if the ->mode_set_base helper operation is not provided, the helper function performs a full mode set sequence by calling the ->prepare, ->mode_set and ->commit CRTC and encoder helper operations, in that order. Order matters, bestie β€” do not shuffle it πŸ™ˆ Alternatively it can also use the dpms and disable helper operations. For details see struct drm_crtc_helper_funcs and struct drm_encoder_helper_funcs πŸ‘‘

⚠️ deprecated alert β€” this function is deprecated. New drivers must implement atomic modeset support, for which this function is unsuitable. Instead, drivers should use drm_atomic_helper_set_config. That's not a maybe, that's the official move, periodt πŸ’…

πŸŽ€ RETURN πŸŽ€

Returns 0 on success, negative errno numbers on failure. Clean, simple, iconic ✨

πŸ‘‘ SEE ALSO πŸ‘‘


byeee bestie 🫢 this page's source/version is ./drivers/gpu/drm, dated October 2026, and it's the drm_crtc_helper_set_config(9) page. Now go forth and set that config β€” or better yet, use atomic helpers πŸ˜­πŸ’–

πŸ“¦ where this page comes from