]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/amd/display: Permit DC_FP_START/END only in non-FP compilation units
authorArd Biesheuvel <ardb@kernel.org>
Thu, 9 Oct 2025 15:06:21 +0000 (17:06 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 8 Dec 2025 18:56:37 +0000 (13:56 -0500)
commita574f53ed52e7c5c0e67e67efd76f296d42f0cdd
tree3ebe9e350c2f6e951133710505bb013cc4218af1
parent03fc40766d01b05175d3b657b78686d9805bf3c5
drm/amd/display: Permit DC_FP_START/END only in non-FP compilation units

[WHAT]
Test the existing CPP macro _LINUX_FPU_COMPILATION_UNIT, which is set
when building source files that are permitted to use floating point,
in the implementation of DC_FP_START/END so that those are only usable
in non-FP code. This is a requirement of the generic kernel mode FPU
API, as some architectures (i.e., arm64) cannot safely enable FP codegen
in arbitrary code.

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
Suggested-by: Christian König <christian.koenig@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/dc_fpu.h
drivers/gpu/drm/amd/display/dc/os_types.h