On Thu, Oct 27, 2022, at 02:25, Ao Zhong wrote: > After moving all FPU code to the DML folder, we can enable DCN support > for the ARM64 platform. Remove the -mgeneral-regs-only CFLAG from the > code in the DML folder that needs to use hardware FPU, and add a control > mechanism for ARM Neon. > > Signed-off-by: Ao Zhong <hacc1225@xxxxxxxxx> There have been problems with stack frame overflows on this code in the past, how much have you tested this with random configurations to see if we still hit them in corner cases on arm64 that may not show up on x86 or powerpc? I would expect to see a few more of them for every new architecture port. > index d0c6cf61c676..3cdd109189e0 100644 > --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile > +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile > @@ -33,6 +33,12 @@ ifdef CONFIG_PPC64 > dml_ccflags := -mhard-float -maltivec > endif > > +ifdef CONFIG_ARM64 > +ifdef CONFIG_DRM_AMD_DC_DCN > +dml_rcflags_arm64 := -mgeneral-regs-only > +endif > +endif > + > CFLAGS_$(AMDDALPATH)/dc/dml/calcs/dcn_calcs.o := $(dml_ccflags) > CFLAGS_$(AMDDALPATH)/dc/dml/calcs/dcn_calc_auto.o := $(dml_ccflags) > CFLAGS_$(AMDDALPATH)/dc/dml/calcs/dcn_calc_math.o := $(dml_ccflags) > -Wno-tautological-compare > -CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/display_mode_vba.o := $(dml_rcflags) > +CFLAGS_REMOVE_$(AMDDALPATH)/dc/dml/display_mode_vba.o := > $(dml_rcflags) $(dml_rcflags_arm64) Why do you need separate $(dml_rcflags) and $(dml_rcflags_arm64) rather than adding -mgeneral-regs-only to $(dml_rcflags) directly? Arnd