dm_test_fil...3_zero_modes(9)
π NAME π
okay so bestie, this one is dm_test_fill_audio_info_cea_ge_3_zero_modes β a KUnit test for the "cea >= 3 but zero modes" situation, and yes it's from the Kernel API Manual (section 9, kernel-doc girlies rise) β¨
π¦ SYNOPSIS π¦
void dm_test_fill_audio_info_cea_ge_3_zero_modes (struct kunit *test );
that's it. that's the whole signature. slay π
π ARGUMENTS π
testβ the KUnit test context, aka the little β¨vibe containerβ¨ that KUnit hands you so the test knows where it lives.
πΈ DESCRIPTION πΈ
okay so picture this π β cea_rev >= 3, right? so everyone's like "oh the sink definitely has audio modes, bestie, it's a modern revision." but plot twist: the sink reports no audio modes. none. zero. a whole empty roster π
and the rule is: in that case, mode_count must be copied as 0, and no mode entries should be populated. like, don't invent modes. don't fill the array with ghosts. the count is zero and the entries stay unpopulated, periodt π«Ά
that's literally what this test is here to verify. main character energy for an empty list, honestly π
ngl this is the exact kind of regression test that quietly saves your whole afternoon later. no cap.
π SEE ALSO π
the Kernel file lives here β go read the source, it's giving committed:
./drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_audio_test.c
and here's the whole friend group π€ every single one, in order, no one gets left out:
dm_test_audio_init_disabled(9)dm_test_audio_init_enabled_success(9)dm_test_audio_fini_without_enabled_audio(9)dm_test_fill_audio_info_ids_name_flags(9)dm_test_fill_audio_info_cea_lt_3_skips_modes(9)dm_test_fill_audio_info_cea_ge_3_copies_modes(9)dm_test_fill_audio_info_latency_present(9)dm_test_fill_audio_info_latency_absent_keeps_zero(9)dm_test_audio_component_bind_sets_fields(9)dm_test_audio_component_unbind_clears_fields(9)dm_test_eld_notify_invokes_callback(9)dm_test_eld_notify_no_component(9)dm_test_eld_notify_null_audio_ops(9)dm_test_eld_notify_null_callback(9)dm_test_audio_init_pins_sets_defaults(9)dm_test_audio_init_pins_zero_count(9)dm_test_audio_component_get_eld_copies_matching_connector(9)dm_test_audio_component_get_eld_no_match(9)dm_test_commit_audio_notifies_removed_connector(9)dm_test_commit_audio_notifies_added_connector(9)dm_test_commit_audio_skips_writeback_removal(9)dm_test_commit_audio_skips_without_new_crtc_state(9)dm_test_commit_audio_skips_without_stream_status(9)dm_test_commit_audio_skips_detached_connector(9)dm_test_commit_audio_skips_without_modeset(9)dm_test_commit_audio_skips_addition_without_stream(9)dm_test_commit_audio_skips_writeback_addition(9)
and that's the whole page, bestie π sourced from ./drivers/gpu/drm/amd/display/... and dated October 2026 β go forth and test those zero modes, i believe in u fr fr ππ§π
π¦ 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