linux/drivers/gpu/drm/amd/display/dc/resource
Ard Biesheuvel ddbfac1528 drm/amd/display: Fix unsafe uses of kernel mode FPU
The point of isolating code that uses kernel mode FPU in separate
compilation units is to ensure that even implicit uses of, e.g., SIMD
registers for spilling occur only in a context where this is permitted,
i.e., from inside a kernel_fpu_begin/end block.

This is important on arm64, which uses -mgeneral-regs-only to build all
kernel code, with the exception of such compilation units where FP or
SIMD registers are expected to be used. Given that the compiler may
invent uses of FP/SIMD anywhere in such a unit, none of its code may be
accessible from outside a kernel_fpu_begin/end block.

This means that all callers into such compilation units must use the
DC_FP start/end macros, which must not occur there themselves. For
robustness, all functions with external linkage that reside there should
call dc_assert_fp_enabled() to assert that the FPU context was set up
correctly.

Fix this for the DCN35, DCN351 and DCN36 implementations.

Cc: Austin Zheng <austin.zheng@amd.com>
Cc: Jun Lei <jun.lei@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Rodrigo Siqueira <siqueira@igalia.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2025-10-07 14:09:19 -04:00
..
dce60 drm/amd/display: Disable scaling on DCE6 for now 2025-10-07 14:09:06 -04:00
dce80 drm/amd/display: Share dce100_validate_global with DCE6-8 2025-09-25 15:53:46 -04:00
dce100 drm/amd/display: Share dce100_validate_global with DCE6-8 2025-09-25 15:53:46 -04:00
dce110 drm/amd/display: replace fast_validate with enum dc_validate_mode 2025-06-03 15:36:23 -04:00
dce112 drm/amd/display: Multiplication result converted to larger type 2025-08-27 13:57:50 -04:00
dce120 drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
dcn10 drm/amd/display: replace fast_validate with enum dc_validate_mode 2025-06-03 15:36:23 -04:00
dcn20 drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
dcn21 drm/amd/display: Refactor DSC cap calculations 2025-07-15 14:07:51 -04:00
dcn30 drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
dcn31 Revert "drm/amd/display: Reduce Stack Usage by moving 'audio_output' into 'stream_res' v4" 2025-09-15 17:01:17 -04:00
dcn32 drm/amd/display: Disable stutter when programming watermarks on dcn32 2025-09-23 10:26:10 -04:00
dcn35 drm/amd/display: Fix unsafe uses of kernel mode FPU 2025-10-07 14:09:19 -04:00
dcn36 drm/amd/display: Fix unsafe uses of kernel mode FPU 2025-10-07 14:09:19 -04:00
dcn201 drm/amd/display: Refactor DSC cap calculations 2025-07-15 14:07:51 -04:00
dcn301 drm/amd/display: Refactor DSC cap calculations 2025-07-15 14:07:51 -04:00
dcn302 drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
dcn303 drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
dcn314 drm/amd/display: Init dispclk from bootup clock for DCN314 2025-09-23 10:27:01 -04:00
dcn315 drm/amd/display: Refactor DSC cap calculations 2025-07-15 14:07:51 -04:00
dcn316 drm/amd/display: Refactor DSC cap calculations 2025-07-15 14:07:51 -04:00
dcn321 drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
dcn351 drm/amd/display: Fix unsafe uses of kernel mode FPU 2025-10-07 14:09:19 -04:00
dcn401 drm/amd/display: Add DSC padding for OVT Support 2025-09-15 17:01:11 -04:00
Makefile drm/amd/display/dc: reclassify DCE6 resources and hw sequencer 2025-04-08 16:48:14 -04:00