drm/amdgpu/display: fix DCN3.2 Makefiles for non-x86
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / display / dc / dcn32 / Makefile
1 #
2 # (c) Copyright 2022 Advanced Micro Devices, Inc. All the rights reserved
3 #
4 #  All rights reserved.  This notice is intended as a precaution against
5 #  inadvertent publication and does not imply publication or any waiver
6 #  of confidentiality.  The year included in the foregoing notice is the
7 #  year of creation of the work.
8 #
9 #  Authors: AMD
10 #
11 # Makefile for dcn32.
12
13 DCN32 = dcn32_resource.o dcn32_hubbub.o dcn32_hwseq.o dcn32_init.o \
14                 dcn32_dccg.o dcn32_optc.o dcn32_mmhubbub.o dcn32_hubp.o dcn32_dpp.o \
15                 dcn32_dio_stream_encoder.o dcn32_dio_link_encoder.o dcn32_hpo_dp_link_encoder.o \
16                 dcn32_mpc.o
17
18 ifdef CONFIG_X86
19 CFLAGS_$(AMDDALPATH)/dc/dcn32/dcn32_resource.o := -msse
20 endif
21
22 ifdef CONFIG_PPC64
23 CFLAGS_$(AMDDALPATH)/dc/dcn32/dcn32_resource.o := -mhard-float -maltivec
24 endif
25
26 ifdef CONFIG_CC_IS_GCC
27 ifeq ($(call cc-ifversion, -lt, 0701, y), y)
28 IS_OLD_GCC = 1
29 endif
30 CFLAGS_$(AMDDALPATH)/dc/dcn32/dcn32_resource.o += -mhard-float
31 endif
32
33 ifdef IS_OLD_GCC
34 # Stack alignment mismatch, proceed with caution.
35 # GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3
36 # (8B stack alignment).
37 CFLAGS_$(AMDDALPATH)/dc/dcn32/dcn32_resource.o += -mpreferred-stack-boundary=4
38 else
39 CFLAGS_$(AMDDALPATH)/dc/dcn32/dcn32_resource.o += -msse2
40 endif
41
42 AMD_DAL_DCN32 = $(addprefix $(AMDDALPATH)/dc/dcn32/,$(DCN32))
43
44 AMD_DISPLAY_FILES += $(AMD_DAL_DCN32)