diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile index 744fefb67789..0bb7a20675c4 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile @@ -33,8 +33,9 @@ endif dml_ccflags := -mhard-float -msse $(cc_stack_align) CFLAGS_display_mode_lib.o := $(dml_ccflags) -CFLAGS_display_mode_vba.o := $(dml_ccflags) + ifdef CONFIG_DRM_AMD_DC_DCN2_0 +CFLAGS_display_mode_vba.o := $(dml_ccflags) CFLAGS_display_mode_vba_20.o := $(dml_ccflags) CFLAGS_display_rq_dlg_calc_20.o := $(dml_ccflags) endif @@ -46,10 +47,10 @@ CFLAGS_display_rq_dlg_helpers.o := $(dml_ccflags) CFLAGS_dml_common_defs.o := $(dml_ccflags) DML = display_mode_lib.o display_rq_dlg_helpers.o dml1_display_rq_dlg_calc.o \ - dml_common_defs.o display_mode_vba.o + dml_common_defs.o ifdef CONFIG_DRM_AMD_DC_DCN2_0 -DML += dcn20/display_rq_dlg_calc_20.o dcn20/display_mode_vba_20.o +DML += display_mode_vba.o dcn20/display_rq_dlg_calc_20.o dcn20/display_mode_vba_20.o endif AMD_DAL_DML = $(addprefix $(AMDDALPATH)/dc/dml/,$(DML)) diff --git a/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h b/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h index f2331c09fad8..61541c431110 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h +++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_lib.h @@ -27,7 +27,9 @@ #include "dml_common_defs.h" +#ifdef CONFIG_DRM_AMD_DC_DCN2_0 #include "display_mode_vba.h" +#endif enum dml_project { DML_PROJECT_UNDEFINED, @@ -37,6 +39,8 @@ enum dml_project { #endif }; +struct display_mode_lib; + struct dml_funcs { void (*rq_dlg_get_dlg_reg)( struct display_mode_lib *mode_lib, diff --git a/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h b/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h index 38fc0ab32d7b..4e0183dd634a 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h +++ b/drivers/gpu/drm/amd/display/dc/dml/display_mode_vba.h @@ -23,6 +23,8 @@ * */ +#ifdef CONFIG_DRM_AMD_DC_DCN2_0 + #ifndef __DML2_DISPLAY_MODE_VBA_H__ #define __DML2_DISPLAY_MODE_VBA_H__ @@ -847,3 +849,4 @@ double CalculateWriteBackDISPCLK( unsigned int WritebackChromaLineBufferWidth); #endif /* _DML2_DISPLAY_MODE_VBA_H_ */ +#endif