1# SPDX-License-Identifier: MIT
2#
3# Copyright (C) 2021 Advanced Micro Devices, Inc. All the rights reserved
4#
5#  Authors: AMD
6#
7# Makefile for dcn303.
8
9DCN3_03 = dcn303_init.o dcn303_hwseq.o dcn303_resource.o
10
11ifdef CONFIG_X86
12CFLAGS_$(AMDDALPATH)/dc/dcn303/dcn303_resource.o := -msse
13endif
14
15ifdef CONFIG_PPC64
16CFLAGS_$(AMDDALPATH)/dc/dcn303/dcn303_resource.o := -mhard-float -maltivec
17endif
18
19ifdef CONFIG_CC_IS_GCC
20ifeq ($(call cc-ifversion, -lt, 0701, y), y)
21IS_OLD_GCC = 1
22endif
23CFLAGS_$(AMDDALPATH)/dc/dcn303/dcn303_resource.o += -mhard-float
24endif
25
26ifdef CONFIG_X86
27ifdef IS_OLD_GCC
28# Stack alignment mismatch, proceed with caution.
29# GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3
30# (8B stack alignment).
31CFLAGS_$(AMDDALPATH)/dc/dcn303/dcn303_resource.o += -mpreferred-stack-boundary=4
32else
33CFLAGS_$(AMDDALPATH)/dc/dcn303/dcn303_resource.o += -msse2
34endif
35endif
36
37AMD_DAL_DCN3_03 = $(addprefix $(AMDDALPATH)/dc/dcn303/,$(DCN3_03))
38
39AMD_DISPLAY_FILES += $(AMD_DAL_DCN3_03)
40