drm_dp_link_choose(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, so this page lives in the Kernel API Manual and it's all about drm_dp_link_choose β€” literally the function that picks the ✨cheapest✨ link setup that still works for your mode. Iconic behavior tbh.


🌸 SYNOPSIS 🌸

int drm_dp_link_choose (struct drm_dp_link *link , const struct
       struct drm_display_mode *mode , const struct drm_display_info *info );

that's the whole signature, no cap. 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • link β€” your DRM DP link object, the main character here πŸ’…
  • mode β€” the DRM display mode you're trying to feed
  • info β€” the DRM display information, i.e. the receipts on what the display can do

✨ DESCRIPTION ✨

so per the eDP spec, a source is supposed to select a configuration with the lowest number of lanes and the lowest possible link rate that still matches the bitrate requirements of a video mode. lowkey minimalist queen energy: least lanes, slowest rate, still slays the mode. πŸ”₯

but β€” and this is the important part, don't skip it β€” it must ensure it does not exceed the capabilities of the sink. like, no overpromising. the sink said what it said and we respect it. 🫢


πŸ¦‹ RETURN πŸ¦‹

0 on success, or a negative error code on failure. that's it, that's the whole vibe check. πŸŽ€

ngl, always check that return value bestie β€” negative means something went sideways 😭

πŸ’œ SEE ALSO πŸ’œ

the whole friend group fr fr, go read them too πŸ’–


okay that's the page!! sign-off time: it comes from ./drivers/gpu/drm/tegra, dated October 2026, and the page itself is drm_dp_link_choose(9) out of the Kernel API Manual. periodt. 🌈⭐

πŸ“¦ where this page comes from