Merge tag 'amd-drm-next-5.16-2021-09-27' of https://gitlab.freedesktop.org/agd5f...
[sfrench/cifs-2.6.git] / drivers / gpu / drm / amd / display / dc / dcn31 / Makefile
1 #
2 # (c) Copyright 2020 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 dcn31.
12
13 DCN31 = dcn31_resource.o dcn31_hubbub.o dcn31_hwseq.o dcn31_init.o dcn31_hubp.o \
14         dcn31_dccg.o dcn31_optc.o dcn31_dio_link_encoder.o dcn31_panel_cntl.o \
15         dcn31_apg.o dcn31_hpo_dp_stream_encoder.o dcn31_hpo_dp_link_encoder.o \
16         dcn31_afmt.o dcn31_vpg.o
17
18 ifdef CONFIG_X86
19 CFLAGS_$(AMDDALPATH)/dc/dcn31/dcn31_resource.o := -msse
20 endif
21
22 ifdef CONFIG_PPC64
23 CFLAGS_$(AMDDALPATH)/dc/dcn31/dcn31_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/dcn31/dcn31_resource.o += -mhard-float
31 endif
32
33 ifdef CONFIG_X86
34 ifdef IS_OLD_GCC
35 # Stack alignment mismatch, proceed with caution.
36 # GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3
37 # (8B stack alignment).
38 CFLAGS_$(AMDDALPATH)/dc/dcn31/dcn31_resource.o += -mpreferred-stack-boundary=4
39 else
40 CFLAGS_$(AMDDALPATH)/dc/dcn31/dcn31_resource.o += -msse2
41 endif
42 endif
43
44 AMD_DAL_DCN31 = $(addprefix $(AMDDALPATH)/dc/dcn31/,$(DCN31))
45
46 AMD_DISPLAY_FILES += $(AMD_DAL_DCN31)