setup_stub_dpm(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… setup_stub_dpm(9) β€” like, the whole Kernel API Manual moment ✨

okay bestie, welcome to the group chat, this is <pink>setup_stub_dpm</pink> from the Kernel API Manual and it's genuinely so cute and so specific πŸŽ€


🌸 NAME 🌸

setup_stub_dpm β€” spins up a whole stub DPM environment so you can test things πŸ§ͺ✨

✨ SYNOPSIS ✨

void setup_stub_dpm (struct kunit *test , struct amdgpu_device *adev );

that's it. that's the whole signature. no cap 🫢

πŸŽ€ ARGUMENTS πŸŽ€

  • test β€” the KUnit test context πŸ’– like, the little world your test lives inside
  • adev β€” a pointer to the amdgpu_device you're gonna configure, slay πŸ”₯

πŸ’… DESCRIPTION πŸ’…

So what does it actually do, you ask? πŸ‘€

It sets up adev->powerplay.pp_funcs (yes, that whole chain of structs, iconic) and initializes adev->pm.mutex β€” so that the amdgpu_dpm_* functions can be called safely with stub callbacks πŸ’€βœ¨

that's literally the whole vibe: stub it out, lock it down, call away. periodt 🧚

ngl this is test scaffolding, bestie β€” it's for making fake-but-cozy conditions so the real functions don't freak out 🫢

🌈 SEE ALSO 🌈

πŸ“ Kernel file

  • ./drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_pp_smu_test.c

πŸ¦‹ the neighbors (all of them, no skipping, i promise)


and that's the whole page, bestie πŸ’œ this one came from <purple>./drivers/gpu/drm/amd/display/...</purple> and it's dated October 2026 🌸 mwah, go write some tests, you're gonna ate πŸ’…πŸ‘‘

πŸ“¦ where this page comes from