Merge tag 'drm-for-v4.15-amd-dc' of git://people.freedesktop.org/~airlied/linux
[sfrench/cifs-2.6.git] / drivers / gpu / drm / amd / amdgpu / Makefile
index 7fc42e0777705fd6597fb7631aca09f60d9dcf35..78d609123420455a1d8811eaeb6e91ebaa26e626 100644 (file)
@@ -4,13 +4,19 @@
 # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
 
 FULL_AMD_PATH=$(src)/..
+DISPLAY_FOLDER_NAME=display
+FULL_AMD_DISPLAY_PATH = $(FULL_AMD_PATH)/$(DISPLAY_FOLDER_NAME)
 
 ccflags-y := -I$(FULL_AMD_PATH)/include/asic_reg \
        -I$(FULL_AMD_PATH)/include \
        -I$(FULL_AMD_PATH)/amdgpu \
        -I$(FULL_AMD_PATH)/scheduler \
        -I$(FULL_AMD_PATH)/powerplay/inc \
-       -I$(FULL_AMD_PATH)/acp/include
+       -I$(FULL_AMD_PATH)/acp/include \
+       -I$(FULL_AMD_DISPLAY_PATH) \
+       -I$(FULL_AMD_DISPLAY_PATH)/include \
+       -I$(FULL_AMD_DISPLAY_PATH)/dc \
+       -I$(FULL_AMD_DISPLAY_PATH)/amdgpu_dm
 
 amdgpu-y := amdgpu_drv.o
 
@@ -133,4 +139,13 @@ include $(FULL_AMD_PATH)/powerplay/Makefile
 
 amdgpu-y += $(AMD_POWERPLAY_FILES)
 
+ifneq ($(CONFIG_DRM_AMD_DC),)
+
+RELATIVE_AMD_DISPLAY_PATH = ../$(DISPLAY_FOLDER_NAME)
+include $(FULL_AMD_DISPLAY_PATH)/Makefile
+
+amdgpu-y += $(AMD_DISPLAY_FILES)
+
+endif
+
 obj-$(CONFIG_DRM_AMDGPU)+= amdgpu.o