Re: [PATCH RESEND 1/1] drm/amd/display: add DCN support for ARM64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 27.10.22 um 12:52 schrieb Arnd Bergmann:
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.

Our display team has worked quite a bit on those.

For example instead of putting large structures used for temporary calculations on the stack we now either completely avoid or kmalloc them as part of the CRTC structure.

On the other hand I wouldn't put my hand into the fire that this has fixed all the problematic call paths. So keeping an eye open for this is certainly a good idea.

Christian.

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux