Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Move FPU Guards From DML To DC - Part 3

[Why]
FPU guards (DC_FP_START/DC_FP_END) are required to wrap around code that
can manipulates floats. To do this properly, the FPU guards must be used
in a file that is not compiled as a FPU unit. If the guards are used in
a file that is a FPU unit, other sections in the file that aren't guarded
may be end up being compiled to use FPU operations.

[How]
Added DC_FP_START and DC_FP_END to DC functions that call DML functions
using FPU.

Reviewed-by: Dillon Varone <dillon.varone@amd.com>
Signed-off-by: Rafal Ostrowski <rafal.ostrowski@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Rafal Ostrowski and committed by
Alex Deucher
32c1c35b 4bb2f072

+9 -5
+1
drivers/gpu/drm/amd/display/dc/dml2_0/Makefile
··· 85 85 86 86 AMD_DISPLAY_FILES += $(AMD_DAL_DML2) 87 87 88 + 88 89 DML21 := src/dml2_top/dml2_top_interfaces.o 89 90 DML21 += src/dml2_top/dml2_top_soc15.o 90 91 DML21 += src/dml2_core/dml2_core_dcn4.o
+1
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper.c
··· 38 38 (*dml_ctx)->v21.mode_programming.display_config = (*dml_ctx)->v21.mode_support.display_config; 39 39 40 40 DC_RUN_WITH_PREEMPTION_ENABLED((*dml_ctx)->v21.mode_programming.programming = vzalloc(sizeof(struct dml2_display_cfg_programming))); 41 + 41 42 if (!((*dml_ctx)->v21.mode_programming.programming)) 42 43 return false; 43 44
+1 -3
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.c
··· 1 1 // SPDX-License-Identifier: MIT 2 2 // 3 - // Copyright 2024 Advanced Micro Devices, Inc. 3 + // Copyright 2026 Advanced Micro Devices, Inc. 4 4 5 5 #include "dml2_internal_types.h" 6 6 #include "dml_top.h" ··· 377 377 } 378 378 } 379 379 } 380 - 381 -
+1 -1
drivers/gpu/drm/amd/display/dc/dml2_0/dml21/dml21_wrapper_fpu.h
··· 1 1 // SPDX-License-Identifier: MIT 2 2 // 3 - // Copyright 2024 Advanced Micro Devices, Inc. 3 + // Copyright 2026 Advanced Micro Devices, Inc. 4 4 5 5 #ifndef _DML21_WRAPPER_FPU_H_ 6 6 #define _DML21_WRAPPER_FPU_H_
+5 -1
drivers/gpu/drm/amd/display/dc/dml2_0/dml2_wrapper.c
··· 13 13 14 14 #include "dc_fpu.h" 15 15 16 + #if !defined(DC_RUN_WITH_PREEMPTION_ENABLED) 17 + #define DC_RUN_WITH_PREEMPTION_ENABLED(code) code 18 + #endif // !DC_RUN_WITH_PREEMPTION_ENABLED 19 + 16 20 struct dml2_context *dml2_allocate_memory(void) 17 21 { 18 22 struct dml2_context *dml2; ··· 24 20 DC_RUN_WITH_PREEMPTION_ENABLED(dml2 = vzalloc(sizeof(struct dml2_context))); 25 21 return dml2; 26 22 } 27 - 28 23 bool dml2_validate(const struct dc *in_dc, struct dc_state *context, struct dml2_context *dml2, 29 24 enum dc_validate_mode validate_mode) 30 25 { ··· 87 84 initialize_dml2_soc_bbox(*dml2, in_dc, &(*dml2)->v20.dml_core_ctx.soc); 88 85 89 86 initialize_dml2_soc_states(*dml2, in_dc, &(*dml2)->v20.dml_core_ctx.soc, &(*dml2)->v20.dml_core_ctx.states); 87 + 90 88 } 91 89 92 90 bool dml2_create(const struct dc *in_dc, const struct dml2_configuration_options *config, struct dml2_context **dml2)