xref: /linux/drivers/gpu/drm/amd/display/dc/dml2/Makefile (revision 7ee983c850b40043ac4751836fbd9a2b4d0c5937)
17966f319SQingqing Zhuo# SPDX-License-Identifier: MIT */
27966f319SQingqing Zhuo#
37966f319SQingqing Zhuo# Copyright 2023 Advanced Micro Devices, Inc.
47966f319SQingqing Zhuo#
57966f319SQingqing Zhuo# Permission is hereby granted, free of charge, to any person obtaining a
67966f319SQingqing Zhuo# copy of this software and associated documentation files (the "Software"),
77966f319SQingqing Zhuo# to deal in the Software without restriction, including without limitation
87966f319SQingqing Zhuo# the rights to use, copy, modify, merge, publish, distribute, sublicense,
97966f319SQingqing Zhuo# and/or sell copies of the Software, and to permit persons to whom the
107966f319SQingqing Zhuo# Software is furnished to do so, subject to the following conditions:
117966f319SQingqing Zhuo#
127966f319SQingqing Zhuo# The above copyright notice and this permission notice shall be included in
137966f319SQingqing Zhuo# all copies or substantial portions of the Software.
147966f319SQingqing Zhuo#
157966f319SQingqing Zhuo# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
167966f319SQingqing Zhuo# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
177966f319SQingqing Zhuo# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
187966f319SQingqing Zhuo# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
197966f319SQingqing Zhuo# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
207966f319SQingqing Zhuo# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
217966f319SQingqing Zhuo# OTHER DEALINGS IN THE SOFTWARE.
227966f319SQingqing Zhuo#
23d30a584cSStylon Wang# Authors: AMD
24d30a584cSStylon Wang#
25d30a584cSStylon Wang# Makefile for dml2.
267966f319SQingqing Zhuo
27a28e4b67SSamuel Hollanddml2_ccflags := $(CC_FLAGS_FPU)
28a28e4b67SSamuel Hollanddml2_rcflags := $(CC_FLAGS_NO_FPU)
297966f319SQingqing Zhuo
307966f319SQingqing Zhuoifneq ($(CONFIG_FRAME_WARN),0)
316740ec97SNathan Chancellor    ifeq ($(filter y,$(CONFIG_KASAN)$(CONFIG_KCSAN)),y)
32e4479aecSNathan Chancellor        ifeq ($(CONFIG_CC_IS_CLANG)$(CONFIG_COMPILE_TEST),yy)
33*820ccf8cSNathan Chancellor            frame_warn_limit := 4096
34e4479aecSNathan Chancellor        else
35*820ccf8cSNathan Chancellor            frame_warn_limit := 3072
36e4479aecSNathan Chancellor        endif
376740ec97SNathan Chancellor    else
38*820ccf8cSNathan Chancellor        frame_warn_limit := 2048
39*820ccf8cSNathan Chancellor    endif
40*820ccf8cSNathan Chancellor
41*820ccf8cSNathan Chancellor    ifeq ($(call test-lt, $(CONFIG_FRAME_WARN), $(frame_warn_limit)),y)
42*820ccf8cSNathan Chancellor        frame_warn_flag := -Wframe-larger-than=$(frame_warn_limit)
437966f319SQingqing Zhuo    endif
446740ec97SNathan Chancellorendif
457966f319SQingqing Zhuo
46caef6c45SAurabindo Pillaisubdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2
4700c39110SAurabindo Pillaisubdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/dml2_core
4800c39110SAurabindo Pillaisubdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/dml2_mcg/
4900c39110SAurabindo Pillaisubdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/dml2_dpmm/
5000c39110SAurabindo Pillaisubdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/dml2_pmo/
5100c39110SAurabindo Pillaisubdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/dml2_standalone_libraries/
5200c39110SAurabindo Pillaisubdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/src/inc
5300c39110SAurabindo Pillaisubdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/inc
5400c39110SAurabindo Pillaisubdir-ccflags-y += -I$(FULL_AMD_DISPLAY_PATH)/dc/dml2/dml21/
5500c39110SAurabindo Pillai
56089dbf6aSNathan ChancellorCFLAGS_$(AMDDALPATH)/dc/dml2/display_mode_core.o := $(dml2_ccflags) $(frame_warn_flag)
577966f319SQingqing ZhuoCFLAGS_$(AMDDALPATH)/dc/dml2/display_mode_util.o := $(dml2_ccflags)
587966f319SQingqing ZhuoCFLAGS_$(AMDDALPATH)/dc/dml2/dml2_wrapper.o := $(dml2_ccflags)
597966f319SQingqing ZhuoCFLAGS_$(AMDDALPATH)/dc/dml2/dml2_utils.o := $(dml2_ccflags)
607966f319SQingqing ZhuoCFLAGS_$(AMDDALPATH)/dc/dml2/dml2_policy.o := $(dml2_ccflags)
617966f319SQingqing ZhuoCFLAGS_$(AMDDALPATH)/dc/dml2/dml2_translation_helper.o := $(dml2_ccflags)
627966f319SQingqing ZhuoCFLAGS_$(AMDDALPATH)/dc/dml2/dml2_mall_phantom.o := $(dml2_ccflags)
637966f319SQingqing ZhuoCFLAGS_$(AMDDALPATH)/dc/dml2/dml_display_rq_dlg_calc.o := $(dml2_ccflags)
647966f319SQingqing ZhuoCFLAGS_$(AMDDALPATH)/dc/dml2/dml2_dc_resource_mgmt.o := $(dml2_ccflags)
657966f319SQingqing Zhuo
667966f319SQingqing ZhuoCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/display_mode_core.o := $(dml2_rcflags)
677966f319SQingqing ZhuoCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/display_mode_util.o := $(dml2_rcflags)
687966f319SQingqing ZhuoCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_wrapper.o := $(dml2_rcflags)
697966f319SQingqing ZhuoCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_utils.o := $(dml2_rcflags)
707966f319SQingqing ZhuoCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_policy.o := $(dml2_rcflags)
717966f319SQingqing ZhuoCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_translation_helper.o := $(dml2_rcflags)
727966f319SQingqing ZhuoCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_mall_phantom.o := $(dml2_rcflags)
737966f319SQingqing ZhuoCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml_display_rq_dlg_calc.o := $(dml2_rcflags)
747966f319SQingqing ZhuoCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml2_dc_resource_mgmt.o := $(dml2_rcflags)
757966f319SQingqing Zhuo
767966f319SQingqing ZhuoDML2 = display_mode_core.o display_mode_util.o dml2_wrapper.o \
777966f319SQingqing Zhuo		dml2_utils.o dml2_policy.o dml2_translation_helper.o dml2_dc_resource_mgmt.o dml2_mall_phantom.o \
787966f319SQingqing Zhuo		dml_display_rq_dlg_calc.o
797966f319SQingqing Zhuo
807966f319SQingqing ZhuoAMD_DAL_DML2 = $(addprefix $(AMDDALPATH)/dc/dml2/,$(DML2))
817966f319SQingqing Zhuo
827966f319SQingqing ZhuoAMD_DISPLAY_FILES += $(AMD_DAL_DML2)
837966f319SQingqing Zhuo
84be4e3509SAustin ZhengCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_top/dml2_top_interfaces.o := $(dml2_ccflags)
85be4e3509SAustin ZhengCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_top/dml2_top_soc15.o := $(dml2_ccflags)
8600c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.o := $(dml2_ccflags)
87aa463cc8SNathan ChancellorCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.o := $(dml2_ccflags) $(frame_warn_flag)
8800c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_factory.o := $(dml2_ccflags)
8900c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_ccflags)
9000c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.o := $(dml2_ccflags)
9100c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.o := $(dml2_ccflags)
9200c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.o := $(dml2_ccflags)
9300c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.o := $(dml2_ccflags)
9400c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.o := $(dml2_ccflags)
9500c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.o := $(dml2_ccflags)
9600c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.o := $(dml2_ccflags)
9700c39110SAurabindo Pillai
9800c39110SAurabindo Pillai
9900c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/src/dml21_wrapper.o := $(dml2_ccflags)
10000c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/dml21_translation_helper.o := $(dml2_ccflags)
10100c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/dml21_utils.o := $(dml2_ccflags)
10200c39110SAurabindo PillaiCFLAGS_$(AMDDALPATH)/dc/dml2/dml21/inc/dml2_debug.o := $(dml2_ccflags)
10300c39110SAurabindo Pillai
104be4e3509SAustin ZhengCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_top/dml2_top_interfaces.o := $(dml2_rcflags)
105be4e3509SAustin ZhengCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_top/dml2_top_soc15.o := $(dml2_rcflags)
10600c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4.o := $(dml2_rcflags)
107aa463cc8SNathan ChancellorCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.o := $(dml2_rcflags)
10800c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_core/dml2_core_factory.o := $(dml2_rcflags)
10900c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_dcn4.o := $(dml2_rcflags)
11000c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_dpmm/dml2_dpmm_factory.o := $(dml2_rcflags)
11100c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_dcn4.o := $(dml2_rcflags)
11200c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_mcg/dml2_mcg_factory.o := $(dml2_rcflags)
11300c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn3.o := $(dml2_rcflags)
11400c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_dcn4_fams2.o := $(dml2_rcflags)
11500c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_pmo/dml2_pmo_factory.o := $(dml2_rcflags)
11600c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml2_standalone_libraries/lib_float_math.o := $(dml2_rcflags)
11700c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/src/dml21_wrapper.o := $(dml2_rcflags)
11800c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/dml21_translation_helper.o := $(dml2_rcflags)
11900c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/dml21_utils.o := $(dml2_rcflags)
12000c39110SAurabindo PillaiCFLAGS_REMOVE_$(AMDDALPATH)/dc/dml2/dml21/inc/dml2_debug.o := $(dml2_rcflags)
12100c39110SAurabindo Pillai
122be4e3509SAustin ZhengDML21 := src/dml2_top/dml2_top_interfaces.o
123be4e3509SAustin ZhengDML21 += src/dml2_top/dml2_top_soc15.o
12400c39110SAurabindo PillaiDML21 += src/inc/dml2_debug.o
12500c39110SAurabindo PillaiDML21 += src/dml2_core/dml2_core_dcn4.o
12600c39110SAurabindo PillaiDML21 += src/dml2_core/dml2_core_factory.o
12700c39110SAurabindo PillaiDML21 += src/dml2_core/dml2_core_dcn4_calcs.o
12800c39110SAurabindo PillaiDML21 += src/dml2_dpmm/dml2_dpmm_dcn4.o
12900c39110SAurabindo PillaiDML21 += src/dml2_dpmm/dml2_dpmm_factory.o
13000c39110SAurabindo PillaiDML21 += src/dml2_mcg/dml2_mcg_dcn4.o
13100c39110SAurabindo PillaiDML21 += src/dml2_mcg/dml2_mcg_factory.o
13200c39110SAurabindo PillaiDML21 += src/dml2_pmo/dml2_pmo_dcn3.o
13300c39110SAurabindo PillaiDML21 += src/dml2_pmo/dml2_pmo_factory.o
13400c39110SAurabindo PillaiDML21 += src/dml2_pmo/dml2_pmo_dcn4_fams2.o
13500c39110SAurabindo PillaiDML21 += src/dml2_standalone_libraries/lib_float_math.o
13600c39110SAurabindo PillaiDML21 += dml21_translation_helper.o
13700c39110SAurabindo PillaiDML21 += dml21_wrapper.o
13800c39110SAurabindo PillaiDML21 += dml21_utils.o
13900c39110SAurabindo Pillai
14000c39110SAurabindo PillaiAMD_DAL_DML21 = $(addprefix $(AMDDALPATH)/dc/dml2/dml21/,$(DML21))
14100c39110SAurabindo Pillai
14200c39110SAurabindo PillaiAMD_DISPLAY_FILES += $(AMD_DAL_DML21)
14300c39110SAurabindo Pillai
144