drm_helper_...nector_modes(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

โœจ drm_helper_probe_single_connector_modes(9) โœจ

okay bestie, we're in the Kernel API Manual today and this one is literally the glow-up routine for your display modes ๐Ÿ’… buckle up, it's giving "makeover montage but for connectors".


๐ŸŽ€ NAME ๐ŸŽ€

drm_helper_probe_single_connector_modes โ€” get the complete set of display modes. like, all of them. the whole wardrobe. ๐Ÿ‘‘


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

int drm_helper_probe_single_connector_modes (struct drm_connector
*connector , uint32_t maxX , uint32_t maxY );

๐ŸŒธ ARGUMENTS ๐ŸŒธ

  • connector โ€” the connector we're probing. this is our main character fr.
  • maxX โ€” max width for modes. the width vibe check.
  • maxY โ€” max height for modes. the height vibe check.

๐Ÿ’– DESCRIPTION ๐Ÿ’–

So here's the tea โ˜• โ€” based on the helper callbacks that connector implements in struct drm_connector_helper_funcs, we try to detect all the valid modes. no cap, all of them.

Modes get added to the connector's probed_modes list first, and then they get culled (based on validity and the maxX, maxY parameters โ€” yeah, those two) and dropped into the normal modes list. it's giving audition then callback. ๐ŸŽฌ

This is intended to be used as a generic implementation of the drm_connector_funcs.fill_modes vfunc, for drivers that use the CRTC helpers for output mode filtering and detection. iykyk.

The basic procedure is literally as follows, step by step, no skipping:

  1. All modes currently on the connector's modes list are marked as stale. like, old news, bestie. ๐Ÿ—‘๏ธ
  2. New modes are added to the connector's probed_modes list with drm_mode_probed_add. New modes start their life with status as OK โ€” fresh out the box, thriving, unproblematic. โœจ Modes are added from a single source using the following priority order:
    • drm_connector_helper_funcs.get_modes vfunc
    • if the connector status is connector_status_connected, standard VESA DMT modes up to 1024x768 are automatically added (drm_add_modes_noedid)

Finally, modes specified via the kernel command line (video=...) are added in addition to what the earlier probes produced (drm_helper_probe_add_cmdline_mode). These modes are generated using the VESA GTF/CVT formulas. math girlies rise ๐Ÿงฎ

  1. Modes are moved from the probed_modes list to the modes list. Potential duplicates are merged together (see drm_connector_list_update). After this step the probed_modes list will be empty again. clean slate, we love a reset ๐Ÿซถ
  2. Any non-stale mode on the modes list then undergoes validation:
    • drm_mode_validate_basic performs basic sanity checks
    • drm_mode_validate_size filters out modes larger than maxX and maxY (if specified)
    • drm_mode_validate_flag checks the modes against basic connector capabilities (interlace_allowed,doublescan_allowed,stereo_allowed)
    • the optional drm_connector_helper_funcs.mode_valid or drm_connector_helper_funcs.mode_valid_ctx helpers can perform driver and/or sink specific checks
    • the optional drm_crtc_helper_funcs.mode_valid, drm_bridge_funcs.mode_valid and drm_encoder_helper_funcs.mode_valid helpers can perform driver and/or source specific checks which are also enforced by the modeset/atomic helpers
  3. Any mode whose status is not OK is pruned from the connector's modes list, accompanied by a debug message indicating the reason for the mode's rejection (see drm_mode_prune_invalid). it's not you it's your status ๐Ÿ’€ but don't worry, the debug message explains everything.

๐Ÿ”ฅ RETURN ๐Ÿ”ฅ

The number of modes found on connector. that's it, that's the number, that's the whole return value ๐Ÿ‘‘


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

Kernel file ./drivers/gpu/drm/drm_probe_helper.c, output probing helper overview(9), drm_kms_helper_poll_enable(9), drm_kms_helper_poll_reschedule(9), drm_helper_probe_detect(9), drm_kms_helper_hotplug_event(9), drm_kms_helper_connector_hotplug_event(9), drm_kms_helper_is_poll_worker(9), drm_kms_helper_poll_disable(9), drm_kms_helper_poll_init(9), drm_kms_helper_poll_fini(9), drmm_kms_helper_poll_init(9), drm_connector_helper_hpd_irq_event(9), drm_helper_hpd_irq_event(9), drm_crtc_helper_mode_valid_fixed(9), drm_connector_helper_get_modes_fixed(9), drm_connector_helper_get_modes(9), drm_connector_helper_tv_get_modes(9), drm_connector_helper_detect_from_ddc(9)


and that's the whole page, bestie!! ๐Ÿ’œ this little masterpiece lives in ./drivers/gpu/drm and it ate, dated October 2026 โ€” save the date, screenshot it, put it on the fridge ๐Ÿงšโœจ๐Ÿ’–

๐Ÿ“ฆ where this page comes from