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