mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
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>
This commit is contained in:
parent
4bb2f0721e
commit
32c1c35b6d
|
|
@ -85,6 +85,7 @@ AMD_DAL_DML2 = $(addprefix $(AMDDALPATH)/dc/dml2_0/,$(DML2))
|
|||
|
||||
AMD_DISPLAY_FILES += $(AMD_DAL_DML2)
|
||||
|
||||
|
||||
DML21 := src/dml2_top/dml2_top_interfaces.o
|
||||
DML21 += src/dml2_top/dml2_top_soc15.o
|
||||
DML21 += src/dml2_core/dml2_core_dcn4.o
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ static bool dml21_allocate_memory(struct dml2_context **dml_ctx)
|
|||
(*dml_ctx)->v21.mode_programming.display_config = (*dml_ctx)->v21.mode_support.display_config;
|
||||
|
||||
DC_RUN_WITH_PREEMPTION_ENABLED((*dml_ctx)->v21.mode_programming.programming = vzalloc(sizeof(struct dml2_display_cfg_programming)));
|
||||
|
||||
if (!((*dml_ctx)->v21.mode_programming.programming))
|
||||
return false;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
// Copyright 2024 Advanced Micro Devices, Inc.
|
||||
// Copyright 2026 Advanced Micro Devices, Inc.
|
||||
|
||||
#include "dml2_internal_types.h"
|
||||
#include "dml_top.h"
|
||||
|
|
@ -377,5 +377,3 @@ void dml21_prepare_mcache_programming(struct dc *in_dc, struct dc_state *context
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
// Copyright 2024 Advanced Micro Devices, Inc.
|
||||
// Copyright 2026 Advanced Micro Devices, Inc.
|
||||
|
||||
#ifndef _DML21_WRAPPER_FPU_H_
|
||||
#define _DML21_WRAPPER_FPU_H_
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@
|
|||
|
||||
#include "dc_fpu.h"
|
||||
|
||||
#if !defined(DC_RUN_WITH_PREEMPTION_ENABLED)
|
||||
#define DC_RUN_WITH_PREEMPTION_ENABLED(code) code
|
||||
#endif // !DC_RUN_WITH_PREEMPTION_ENABLED
|
||||
|
||||
struct dml2_context *dml2_allocate_memory(void)
|
||||
{
|
||||
struct dml2_context *dml2;
|
||||
|
|
@ -20,7 +24,6 @@ struct dml2_context *dml2_allocate_memory(void)
|
|||
DC_RUN_WITH_PREEMPTION_ENABLED(dml2 = vzalloc(sizeof(struct dml2_context)));
|
||||
return dml2;
|
||||
}
|
||||
|
||||
bool dml2_validate(const struct dc *in_dc, struct dc_state *context, struct dml2_context *dml2,
|
||||
enum dc_validate_mode validate_mode)
|
||||
{
|
||||
|
|
@ -84,6 +87,7 @@ static void dml2_init(const struct dc *in_dc, const struct dml2_configuration_op
|
|||
initialize_dml2_soc_bbox(*dml2, in_dc, &(*dml2)->v20.dml_core_ctx.soc);
|
||||
|
||||
initialize_dml2_soc_states(*dml2, in_dc, &(*dml2)->v20.dml_core_ctx.soc, &(*dml2)->v20.dml_core_ctx.states);
|
||||
|
||||
}
|
||||
|
||||
bool dml2_create(const struct dc *in_dc, const struct dml2_configuration_options *config, struct dml2_context **dml2)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user