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