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
13DCN32 = 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
18ifdef CONFIG_X86
19CFLAGS_$(AMDDALPATH)/dc/dcn32/dcn32_resource.o := -mhard-float -msse
20endif
21
22ifdef CONFIG_PPC64
23CFLAGS_$(AMDDALPATH)/dc/dcn32/dcn32_resource.o := -mhard-float -maltivec
24endif
25
26ifdef CONFIG_CC_IS_GCC
27ifeq ($(call cc-ifversion, -lt, 0701, y), y)
28IS_OLD_GCC = 1
29endif
30endif
31
32ifdef CONFIG_X86
33ifdef 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).
37CFLAGS_$(AMDDALPATH)/dc/dcn32/dcn32_resource.o += -mpreferred-stack-boundary=4
38else
39CFLAGS_$(AMDDALPATH)/dc/dcn32/dcn32_resource.o += -msse2
40endif
41endif
42
43AMD_DAL_DCN32 = $(addprefix $(AMDDALPATH)/dc/dcn32/,$(DCN32))
44
45AMD_DISPLAY_FILES += $(AMD_DAL_DCN32)
46