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
13DCN31 = 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
16ifdef CONFIG_X86
17CFLAGS_$(AMDDALPATH)/dc/dcn31/dcn31_resource.o := -msse
18endif
19
20ifdef CONFIG_PPC64
21CFLAGS_$(AMDDALPATH)/dc/dcn31/dcn31_resource.o := -mhard-float -maltivec
22endif
23
24ifdef CONFIG_CC_IS_GCC
25ifeq ($(call cc-ifversion, -lt, 0701, y), y)
26IS_OLD_GCC = 1
27endif
28CFLAGS_$(AMDDALPATH)/dc/dcn31/dcn31_resource.o += -mhard-float
29endif
30
31ifdef CONFIG_X86
32ifdef IS_OLD_GCC
33# Stack alignment mismatch, proceed with caution.
34# GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3
35# (8B stack alignment).
36CFLAGS_$(AMDDALPATH)/dc/dcn31/dcn31_resource.o += -mpreferred-stack-boundary=4
37else
38CFLAGS_$(AMDDALPATH)/dc/dcn31/dcn31_resource.o += -msse2
39endif
40endif
41
42AMD_DAL_DCN31 = $(addprefix $(AMDDALPATH)/dc/dcn31/,$(DCN31))
43
44AMD_DISPLAY_FILES += $(AMD_DAL_DCN31)
45