DCN10 FPU MANIPULATION OVERVIEW(9)
π DCN10 FPU manipulation Overview π
ok so bestie, welcome to the Kernel API Manual β¨ and buckle up, because this page is all about the DCN architecture and its whole FPU situation π«Ά
The DCN architecture relies on FPU operations, which require special compilation flags and the use of kernel_fpu_begin/end functions; ideally, we want to avoid spreading FPU access across multiple files. With this idea in mind, this file aims to centralize DCN10 functions that require FPU access in a single place. Code in this file follows the following code pattern:
- Functions that use FPU operations should be isolated in static functions.
- The FPU functions should have the
noinlineattribute to ensure anything that deals with FP register is contained within this call. - All function that needs to be accessed outside this file requires a public interface that not uses any FPU reference.
- Developers must not use
DC_FP_START/ENDin this file, but they need to ensure that the caller invokes it before access any function available in this file. For this reason, public functions in this file must invokedc_assert_fp_enabled;
π¦ okay let's unpack that a lil more π¦
Let's expand a little bit more the idea in the code pattern. To fully isolate FPU operations in a single place, we must avoid situations where compilers spill FP values to registers due to FP enable in a specific C file. Note that even if we isolate all FPU functions in a single file and call its interface from other files, the compiler might enable the use of FPU before we call DC_FP_START.
π Nevertheless, it is the programmer's responsibility to invoke DC_FP_START/END in the correct place. No cap β the compiler is not gonna save you here.
To highlight situations where developers forgot to use the FP protection before calling the DC FPU interface functions, we introduce a helper that checks if the function is invoked under FP protection. If not, it will trigger a kernel warning. π (main character energy for that helper tbh, it's literally snitching on you, but lovingly π)
β¨ SEE ALSO β¨
- Kernel file
./drivers/gpu/drm/amd/display/dc/dml/dcn10/dcn10_fpu.c
ok that's the whole vibe check, you ate that π this lil writeup lives at ./drivers/gpu/drm/amd/display/... and it's dated October 2026 β mwah, slay, periodt πππ
π¦ 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