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