xref: /openbmc/linux/drivers/gpu/drm/amd/display/dc/dcn32/Makefile (revision 85f4bc0c333ceed24cbc9f69a2a77fab1ae3d4d1)
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_resource_helpers.o dcn32_mpc.o
17
18ifdef CONFIG_X86
19dcn32_ccflags := -mhard-float -msse
20endif
21
22ifdef CONFIG_PPC64
23dcn32_ccflags := -mhard-float -maltivec
24endif
25
26ifdef CONFIG_CC_IS_GCC
27ifeq ($(call cc-ifversion, -lt, 0701, y), y)
28IS_OLD_GCC = 1
29endif
30dcn32_ccflags += -mhard-float
31endif
32
33ifdef CONFIG_X86
34ifdef IS_OLD_GCC
35# Stack alignment mismatch, proceed with caution.
36# GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3
37# (8B stack alignment).
38dcn32_ccflags += -mpreferred-stack-boundary=4
39else
40dcn32_ccflags += -msse2
41endif
42endif
43
44CFLAGS_$(AMDDALPATH)/dc/dcn32/dcn32_resource_helpers.o := $(dcn32_ccflags)
45CFLAGS_$(AMDDALPATH)/dc/dcn32/dcn32_resource.o := $(dcn32_ccflags)
46
47AMD_DAL_DCN32 = $(addprefix $(AMDDALPATH)/dc/dcn32/,$(DCN32))
48
49AMD_DISPLAY_FILES += $(AMD_DAL_DCN32)
50