dm_test_idl...ed_runs_body(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… dm_test_idle_worker_enabled_runs_body β€” like, the whole enable-body path, tested

okay so bestie, welcome to the Kernel API Manual πŸŽ€ β€” yes, that's the manual name, and yes, we're doing this. today's main character is dm_test_idle_worker_enabled_runs_body(9), and she's here to test one very specific thing. let's get into it ✨


🌸 NAME 🌸

dm_test_idle_worker_enabled_runs_body β€” literally tests the enable-body path. that's it, that's the job. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

void dm_test_idle_worker_enabled_runs_body (struct kunit *test );

✨ ARGUMENTS ✨

  • test β€” the KUnit test context 🫢 (she's the one holding the vibes, aka the test state)

πŸ”₯ DESCRIPTION πŸ”₯

okay so picture this: we've got a headless device, right? and because it's headless, that makes the second branch false β€” which means the worker goes ahead and runs the enable-body, no cap. and what even is the enable-body? it's dc_post_update_surfaces_to_stream + re-enable, together, as a little duo. πŸ‘‘

then there's an injected hwss.apply_idle_power_optimizations callback β€” this is our little stage-manager 🧚 β€” and what it does is let dc_allow_idle_optimizations clear idle_optimizations_allowed on the disable half. so when the next loop iteration comes around, it breaks at the first branch and the worker just... stops. πŸ’€ iconic behaviour, honestly.


🌈 SEE ALSO 🌈

first up, the kernel file herself β€” she lives at:

./drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_crtc_test.c

and now the whole friend group, all of them, in order, fr fr:


πŸ’€ reminder bestie: none of these are optional reading, they're all in the original SEE ALSO and they're all staying. iykyk.

and that's the page!! πŸŒΈπŸ¦‹ sign-off time: this lil cutie ships out of ./drivers/gpu/drm/amd/display/... and she's dated October 2026 ⭐ β€” love that for her. mwah, go read the kernel source, ily, bye πŸ«ΆπŸ’–

πŸ“¦ where this page comes from