linux/drivers/gpu/drm/amd/display/dc/dml
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
..
calcs drm/amd/display: replace fast_validate with enum dc_validate_mode 2025-06-03 15:36:23 -04:00
dcn10
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: Incorrect 'not' operator usage 2025-08-27 13:57:50 -04:00
dcn30 drm/amd/display: Incorrect 'not' operator usage 2025-08-27 13:57:50 -04:00
dcn31 drm/amd/display: Fix unsafe uses of kernel mode FPU 2025-10-07 14:09:19 -04:00
dcn32 drm/amd/display: Rename header file link.h to link_service.h 2025-09-15 16:57:29 -04:00
dcn35 drm/amd/display: Fix unsafe uses of kernel mode FPU 2025-10-07 14:09:19 -04:00
dcn301 drm/amd/display: replace min/max nesting with clamp() 2025-08-18 17:01:32 -04:00
dcn302 drm/amd/display: Array offset used before range check 2025-08-27 13:57:50 -04:00
dcn303 drm/amd/display: Array offset used before range check 2025-08-27 13:57:50 -04:00
dcn314 drm/amd/display: Incorrect 'not' operator usage 2025-08-27 13:57:50 -04:00
dcn321 drm/amd/display: Array offset used before range check 2025-08-27 13:57:50 -04:00
dcn351 drm/amd/display: Fix unsafe uses of kernel mode FPU 2025-10-07 14:09:19 -04:00
dsc
dc_features.h
display_mode_enums.h
display_mode_lib.c
display_mode_lib.h
display_mode_structs.h
display_mode_vba.c
display_mode_vba.h
display_rq_dlg_helpers.c drm/amdgpu: Remove unused print__rq_dlg_params_st 2025-03-05 10:44:46 -05:00
display_rq_dlg_helpers.h drm/amdgpu: Remove unused print__rq_dlg_params_st 2025-03-05 10:44:46 -05:00
dml1_display_rq_dlg_calc.c
dml1_display_rq_dlg_calc.h
dml_inline_defs.h drm/amd/display: Add check for granularity in dml ceil/floor helpers 2025-01-06 14:44:28 -05:00
dml_logger.h
Makefile drm/amd/display: Remove dml/dcn401 files and references 2025-06-18 12:19:16 -04:00