drm/amd/display: Fix DCN302 makefile
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / display / dc / dcn302 / 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 dcn302.
12
13 DCN3_02 = dcn302_init.o dcn302_hwseq.o dcn302_resource.o
14
15 ifdef CONFIG_X86
16 CFLAGS_$(AMDDALPATH)/dc/dcn302/dcn302_resource.o := -mhard-float -msse
17 endif
18
19 ifdef CONFIG_PPC64
20 CFLAGS_$(AMDDALPATH)/dc/dcn302/dcn302_resource.o := -mhard-float -maltivec
21 endif
22
23 ifdef CONFIG_ARM64
24 CFLAGS_REMOVE_$(AMDDALPATH)/dc/dcn302/dcn302_resource.o := -mgeneral-regs-only
25 endif
26
27 ifdef CONFIG_CC_IS_GCC
28 ifeq ($(call cc-ifversion, -lt, 0701, y), y)
29 IS_OLD_GCC = 1
30 endif
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/dcn302/dcn302_resource.o += -mpreferred-stack-boundary=4
39 else
40 CFLAGS_$(AMDDALPATH)/dc/dcn302/dcn302_resource.o += -msse2
41 endif
42 endif
43
44 AMD_DAL_DCN3_02 = $(addprefix $(AMDDALPATH)/dc/dcn302/,$(DCN3_02))
45
46 AMD_DISPLAY_FILES += $(AMD_DAL_DCN3_02)