xref: /linux/drivers/gpu/drm/msm/Makefile (revision 4f77c3462308c62ffe7129cc18b9ac937f44b5a5)
1# SPDX-License-Identifier: GPL-2.0
2ccflags-y := -I $(src)
3ccflags-y += -I $(obj)/generated
4ccflags-y += -I $(src)/disp/dpu1
5ccflags-$(CONFIG_DRM_MSM_DSI) += -I $(src)/dsi
6ccflags-$(CONFIG_DRM_MSM_DP) += -I $(src)/dp
7
8adreno-y := \
9	adreno/adreno_device.o \
10	adreno/adreno_gpu.o \
11	adreno/a2xx_catalog.o \
12	adreno/a2xx_gpu.o \
13	adreno/a2xx_gpummu.o \
14	adreno/a3xx_catalog.o \
15	adreno/a3xx_gpu.o \
16	adreno/a4xx_catalog.o \
17	adreno/a4xx_gpu.o \
18	adreno/a5xx_catalog.o \
19	adreno/a5xx_gpu.o \
20	adreno/a5xx_power.o \
21	adreno/a5xx_preempt.o \
22	adreno/a6xx_catalog.o \
23	adreno/a6xx_gpu.o \
24	adreno/a6xx_gmu.o \
25	adreno/a6xx_hfi.o \
26
27adreno-$(CONFIG_DEBUG_FS) += adreno/a5xx_debugfs.o \
28
29adreno-$(CONFIG_DRM_MSM_GPU_STATE)	+= adreno/a6xx_gpu_state.o
30
31msm-display-$(CONFIG_DRM_MSM_HDMI) += \
32	hdmi/hdmi.o \
33	hdmi/hdmi_audio.o \
34	hdmi/hdmi_bridge.o \
35	hdmi/hdmi_hpd.o \
36	hdmi/hdmi_i2c.o \
37	hdmi/hdmi_phy.o \
38	hdmi/hdmi_phy_8960.o \
39	hdmi/hdmi_phy_8996.o \
40	hdmi/hdmi_phy_8x60.o \
41	hdmi/hdmi_phy_8x74.o \
42	hdmi/hdmi_pll_8960.o \
43
44msm-display-$(CONFIG_DRM_MSM_MDP4) += \
45	disp/mdp4/mdp4_crtc.o \
46	disp/mdp4/mdp4_dsi_encoder.o \
47	disp/mdp4/mdp4_dtv_encoder.o \
48	disp/mdp4/mdp4_lcdc_encoder.o \
49	disp/mdp4/mdp4_lvds_connector.o \
50	disp/mdp4/mdp4_lvds_pll.o \
51	disp/mdp4/mdp4_irq.o \
52	disp/mdp4/mdp4_kms.o \
53	disp/mdp4/mdp4_plane.o \
54
55msm-display-$(CONFIG_DRM_MSM_MDP5) += \
56	disp/mdp5/mdp5_cfg.o \
57	disp/mdp5/mdp5_cmd_encoder.o \
58	disp/mdp5/mdp5_ctl.o \
59	disp/mdp5/mdp5_crtc.o \
60	disp/mdp5/mdp5_encoder.o \
61	disp/mdp5/mdp5_irq.o \
62	disp/mdp5/mdp5_kms.o \
63	disp/mdp5/mdp5_pipe.o \
64	disp/mdp5/mdp5_mixer.o \
65	disp/mdp5/mdp5_plane.o \
66	disp/mdp5/mdp5_smp.o \
67
68msm-display-$(CONFIG_DRM_MSM_DPU) += \
69	disp/dpu1/dpu_core_perf.o \
70	disp/dpu1/dpu_crtc.o \
71	disp/dpu1/dpu_encoder.o \
72	disp/dpu1/dpu_encoder_phys_cmd.o \
73	disp/dpu1/dpu_encoder_phys_vid.o \
74	disp/dpu1/dpu_encoder_phys_wb.o \
75	disp/dpu1/dpu_formats.o \
76	disp/dpu1/dpu_hw_catalog.o \
77	disp/dpu1/dpu_hw_cdm.o \
78	disp/dpu1/dpu_hw_ctl.o \
79	disp/dpu1/dpu_hw_dsc.o \
80	disp/dpu1/dpu_hw_dsc_1_2.o \
81	disp/dpu1/dpu_hw_interrupts.o \
82	disp/dpu1/dpu_hw_intf.o \
83	disp/dpu1/dpu_hw_lm.o \
84	disp/dpu1/dpu_hw_pingpong.o \
85	disp/dpu1/dpu_hw_sspp.o \
86	disp/dpu1/dpu_hw_dspp.o \
87	disp/dpu1/dpu_hw_merge3d.o \
88	disp/dpu1/dpu_hw_top.o \
89	disp/dpu1/dpu_hw_util.o \
90	disp/dpu1/dpu_hw_vbif.o \
91	disp/dpu1/dpu_hw_wb.o \
92	disp/dpu1/dpu_kms.o \
93	disp/dpu1/dpu_plane.o \
94	disp/dpu1/dpu_rm.o \
95	disp/dpu1/dpu_vbif.o \
96	disp/dpu1/dpu_writeback.o
97
98msm-display-$(CONFIG_DRM_MSM_MDSS) += \
99	msm_mdss.o \
100
101msm-display-y += \
102	disp/mdp_format.o \
103	disp/mdp_kms.o \
104	disp/msm_disp_snapshot.o \
105	disp/msm_disp_snapshot_util.o \
106
107msm-y += \
108	msm_atomic.o \
109	msm_atomic_tracepoints.o \
110	msm_debugfs.o \
111	msm_drv.o \
112	msm_fb.o \
113	msm_fence.o \
114	msm_gem.o \
115	msm_gem_prime.o \
116	msm_gem_shrinker.o \
117	msm_gem_submit.o \
118	msm_gem_vma.o \
119	msm_gpu.o \
120	msm_gpu_devfreq.o \
121	msm_io_utils.o \
122	msm_iommu.o \
123	msm_kms.o \
124	msm_perf.o \
125	msm_rd.o \
126	msm_ringbuffer.o \
127	msm_submitqueue.o \
128	msm_gpu_tracepoints.o \
129
130msm-$(CONFIG_DRM_FBDEV_EMULATION) += msm_fbdev.o
131
132msm-display-$(CONFIG_DEBUG_FS) += \
133	dp/dp_debug.o
134
135msm-display-$(CONFIG_DRM_MSM_DP)+= dp/dp_aux.o \
136	dp/dp_catalog.o \
137	dp/dp_ctrl.o \
138	dp/dp_display.o \
139	dp/dp_drm.o \
140	dp/dp_link.o \
141	dp/dp_panel.o \
142	dp/dp_audio.o \
143	dp/dp_utils.o
144
145msm-display-$(CONFIG_DRM_MSM_HDMI_HDCP) += hdmi/hdmi_hdcp.o
146
147msm-display-$(CONFIG_DRM_MSM_DSI) += dsi/dsi.o \
148			dsi/dsi_cfg.o \
149			dsi/dsi_host.o \
150			dsi/dsi_manager.o \
151			dsi/phy/dsi_phy.o
152
153msm-display-$(CONFIG_DRM_MSM_DSI_28NM_PHY) += dsi/phy/dsi_phy_28nm.o
154msm-display-$(CONFIG_DRM_MSM_DSI_20NM_PHY) += dsi/phy/dsi_phy_20nm.o
155msm-display-$(CONFIG_DRM_MSM_DSI_28NM_8960_PHY) += dsi/phy/dsi_phy_28nm_8960.o
156msm-display-$(CONFIG_DRM_MSM_DSI_14NM_PHY) += dsi/phy/dsi_phy_14nm.o
157msm-display-$(CONFIG_DRM_MSM_DSI_10NM_PHY) += dsi/phy/dsi_phy_10nm.o
158msm-display-$(CONFIG_DRM_MSM_DSI_7NM_PHY) += dsi/phy/dsi_phy_7nm.o
159
160msm-y += $(adreno-y) $(msm-display-y)
161
162obj-$(CONFIG_DRM_MSM)	+= msm.o
163
164ifeq (y,$(CONFIG_DRM_MSM_VALIDATE_XML))
165	headergen-opts += --validate
166else
167	headergen-opts += --no-validate
168endif
169
170quiet_cmd_headergen = GENHDR  $@
171      cmd_headergen = mkdir -p $(obj)/generated && $(PYTHON3) $(src)/registers/gen_header.py \
172		      $(headergen-opts) --rnn $(src)/registers --xml $< c-defines > $@
173
174$(obj)/generated/%.xml.h: $(src)/registers/adreno/%.xml \
175		$(src)/registers/adreno/adreno_common.xml \
176		$(src)/registers/adreno/adreno_pm4.xml \
177		$(src)/registers/freedreno_copyright.xml \
178		$(src)/registers/gen_header.py \
179		$(src)/registers/rules-fd.xsd \
180		FORCE
181	$(call if_changed,headergen)
182
183$(obj)/generated/%.xml.h: $(src)/registers/display/%.xml \
184		$(src)/registers/freedreno_copyright.xml \
185		$(src)/registers/gen_header.py \
186		$(src)/registers/rules-fd.xsd \
187		FORCE
188	$(call if_changed,headergen)
189
190ADRENO_HEADERS = \
191	generated/a2xx.xml.h \
192	generated/a3xx.xml.h \
193	generated/a4xx.xml.h \
194	generated/a5xx.xml.h \
195	generated/a6xx.xml.h \
196	generated/a6xx_gmu.xml.h \
197	generated/adreno_common.xml.h \
198	generated/adreno_pm4.xml.h \
199
200DISPLAY_HEADERS = \
201	generated/dsi_phy_7nm.xml.h \
202	generated/dsi_phy_10nm.xml.h \
203	generated/dsi_phy_14nm.xml.h \
204	generated/dsi_phy_20nm.xml.h \
205	generated/dsi_phy_28nm_8960.xml.h \
206	generated/dsi_phy_28nm.xml.h \
207	generated/dsi.xml.h \
208	generated/hdmi.xml.h \
209	generated/mdp4.xml.h \
210	generated/mdp5.xml.h \
211	generated/mdp_common.xml.h \
212	generated/sfpb.xml.h
213
214$(addprefix $(obj)/,$(adreno-y)): $(addprefix $(obj)/,$(ADRENO_HEADERS))
215$(addprefix $(obj)/,$(msm-display-y)): $(addprefix $(obj)/,$(DISPLAY_HEADERS))
216
217targets += $(ADRENO_HEADERS) $(DISPLAY_HEADERS)
218