• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
2mkfile_dir := $(dir $(mkfile_path))
3disp_dir := $(mkfile_dir)../video/sunxi/disp2/disp
4
5sub_dir  := lowlevel_v33x
6sub_dir1 := de330
7sub_dir2 := tcon
8
9#$(info $(disp_dir))
10#$(error "error: $(disp_dir)")
11include $(disp_dir)/de/Makefile
12include $(disp_dir)/de/$(sub_dir)/Makefile
13
14#filter disp_al.o in de/lowlevel_xxx/
15#it means that filter_obj includes all the files in de/lowlevel_xxx except disp_al.o
16ifeq ($(CONFIG_AW_DRM_DE_V33X),y)
17filter_obj1 = $(filter-out $(mydir)/disp_al_de.o,$(obj_low))
18filter_obj = $(filter-out $(mydir)/disp_al_tcon.o,$(filter_obj1))
19else
20filter_obj = $(filter-out $(mydir)/disp_al.o,$(obj_low))
21endif
22
23#used in 5.10 kernel
24filter_obj = $(obj_low)
25
26#add prefix, result: ../../../drivers/video/sunxi/disp2/disp/de/lowlevel_xxx/xxx
27#drm_low_obj = $(addprefix $(disp_dir)/,$(filter_obj))
28drm_low_obj = $(addprefix ../video/sunxi/disp2/disp/,$(filter_obj))
29
30ccflags-y := -I$(disp_dir)
31ccflags-y += -I$(disp_dir)/de
32ccflags-y += -I$(disp_dir)/de/$(sub_dir)
33ccflags-y += -I$(disp_dir)/de/$(sub_dir)/$(sub_dir1)
34ccflags-y += -I$(disp_dir)/de/$(sub_dir)/$(sub_dir2)
35ccflags-y += -I$(srctree)/drivers/gpu/drm
36
37ifeq ($(CONFIG_AW_DRM_DE_V33X),y)
38ccflags-y += -DDE_VERSION_V33X
39endif
40
41obj-$(CONFIG_AW_DRM)        += sunxidrm.o
42
43sunxidrm-y := sunxi_drm_drv.o
44sunxidrm-y += sunxi_drm_plane.o
45sunxidrm-y += sunxi_drm_crtc.o
46sunxidrm-y += sunxi_drm_encoder.o
47sunxidrm-y += sunxi_drm_connector.o
48sunxidrm-$(CONFIG_AW_DRM_LCD) += sunxi_drm_lcd_connector.o
49sunxidrm-$(CONFIG_AW_DRM_TV) += sunxi_drm_tv_connector.o
50sunxidrm-$(CONFIG_AW_DRM_HDMI14) += sunxi_drm_hdmi_connector.o
51sunxidrm-$(CONFIG_AW_DRM_HDMI20) += sunxi_drm_hdmi_connector.o
52
53sunxidrm-y += sunxi_drm_fb.o
54sunxidrm-y += sunxi_drm_gem.o
55sunxidrm-$(CONFIG_DRM_FBDEV_EMULATION) += sunxi_drm_fbdev.o
56sunxidrm-$(CONFIG_DRM_FBDEV_EMULATION) += sunxi_drm_bootlogo.o
57sunxidrm-y += sunxi_drm_sysfs.o
58sunxidrm-$(CONFIG_AW_DRM_IOMMU) += sunxi_drm_iommu.o
59
60sunxidrm-y += $(drm_low_obj)
61sunxidrm-y += sunxi_device/sunxi_common.o
62
63#add DE
64sunxidrm-$(CONFIG_AW_DRM_DE_SUN50IW1) += sunxi_device/sunxi_de.o
65sunxidrm-$(CONFIG_AW_DRM_DE_V2X) += sunxi_device/sunxi_de.o
66sunxidrm-$(CONFIG_AW_DRM_DE_V3X) += sunxi_device/sunxi_de.o
67sunxidrm-$(CONFIG_AW_DRM_DE_V33X) += sunxi_device/sunxi_de_v33x.o
68
69sunxidrm-$(CONFIG_AW_DRM_DE_SUN50IW1) += sunxi_device/sunxi_tcon.o
70sunxidrm-$(CONFIG_AW_DRM_DE_V2X) += sunxi_device/sunxi_tcon.o
71sunxidrm-$(CONFIG_AW_DRM_DE_V3X) += sunxi_device/sunxi_tcon.o
72sunxidrm-$(CONFIG_AW_DRM_DE_V33X) += sunxi_device/sunxi_tcon_v33x.o
73
74sunxidrm-$(CONFIG_AW_DRM_LCD) += sunxi_device/sunxi_lcd.o
75sunxidrm-$(CONFIG_AW_DRM_BACKLIGHT) += sunxi_device/sunxi_backlight.o
76sunxidrm-$(CONFIG_AW_DRM_TV) += sunxi_device/sunxi_tv.o
77sunxidrm-$(CONFIG_AW_DRM_HDMI14) += sunxi_device/sunxi_hdmi14.o
78sunxidrm-$(CONFIG_AW_DRM_HDMI20) += sunxi_device/sunxi_hdmi20.o
79
80ifeq ($(CONFIG_AW_DRM_TV),y)
81tv_dir := $(srctree)/../../bsp/drivers/video/sunxi/disp2/tv
82ccflags-y += -I$(tv_dir)
83
84sunxidrm-$(CONFIG_ARCH_SUN8IW11) += ../../../video/sunxi/disp2/tv/de_tve_sun8iw11.o
85sunxidrm-$(CONFIG_ARCH_SUN50IW2) += ../../../video/sunxi/disp2/tv/de_tve_v1.o
86sunxidrm-$(CONFIG_ARCH_SUN8IW12) += ../../../video/sunxi/disp2/tv/de_tve_sun8iw11.o
87sunxidrm-$(CONFIG_ARCH_SUN8IW7) += ../../../video/sunxi/disp2/tv/de_tve_sun8iw7.o
88sunxidrm-$(CONFIG_ARCH_SUN8IW17) += ../../../video/sunxi/disp2/tv/de_tve_sun8iw11.o
89endif
90
91ifeq ($(CONFIG_AW_DRM_HDMI14),y)
92sunxidrm-y += sunxi_drm_hdmi_edid.o
93
94hdmi14_dir := $(srctree)/../../bsp/drivers/video/sunxi/disp2/hdmi
95ccflags-y += -I$(hdmi14_dir)
96
97hdmi14_relative_dir := ../../../video/sunxi/disp2/hdmi
98
99$(shell cp $(hdmi14_dir)/libhdmi_sun50iw1 $(hdmi14_dir)/libhdmi_sun50iw1.a)
100$(shell cp $(hdmi14_dir)/libhdmi_sun8iw11 $( hdmi14_dir)/libhdmi_sun8iw11.a)
101
102sunxidrm-$(CONFIG_ARCH_SUN50IW1) += $(hdmi14_relative_dir)/libhdmi_sun50iw1.a
103sunxidrm-$(CONFIG_ARCH_SUN8IW11) += $(hdmi14_relative_dir)/libhdmi_sun8iw11.a
104sunxidrm-$(CONFIG_ARCH_SUN8IW12) += $(hdmi14_relative_dir)/hdmi_bsp_sun8iw12.o
105sunxidrm-$(CONFIG_ARCH_SUN8IW7) += $(hdmi14_relative_dir)/hdmi_bsp_sun8iw7.o
106sunxidrm-$(CONFIG_ARCH_SUN8IW6) += $(hdmi14_relative_dir)/hdmi_bsp_sun8iw6.o
107endif
108
109ifeq ($(CONFIG_AW_DRM_HDMI20),y)
110sunxidrm-y += sunxi_drm_hdmi_edid.o
111hdmi20_dir := $(srctree)/../../bsp/drivers/video/sunxi/disp2/hdmi2
112include $(hdmi20_dir)/Makefile
113
114ccflags-y += -I$(hdmi20_dir)
115
116hdmi20_lowlevel_obj = $(addprefix ../../../../$(hdmi20_dir)/,$(hdmi20_lowlevel))
117sunxidrm-y += $(hdmi20_lowlevel_obj)
118endif
119
120ifeq ($(CONFIG_AW_DRM_LCD),y)
121sunxidrm-$(CONFIG_AW_DRM_LCD_DSI) += sunxi_device/sunxi_dsi.o
122sunxidrm-$(CONFIG_LCD_SUPPORT_DEFAULT) += \
123		sunxi_device/lcd_panel/default_panel.o
124sunxidrm-$(CONFIG_LCD_SUPPORT_BP101WX1) += \
125		sunxi_device/lcd_panel/bp101wx1-206.o
126ifeq ($(AW_DRM_LCD_DSI),y)
127sunxidrm-$(CONFIG_LCD_SUPPORT_HE0801A068) += \
128		sunxi_device/lcd_panel/he0801a068.o
129sunxidrm-$(CONFIG_LCD_SUPPORT_KD101N51) += \
130		sunxi_device/lcd_panel/kd101n51.o
131endif
132endif
133