xref: /openbmc/linux/drivers/gpu/drm/i915/Makefile (revision 133f9794)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for the drm device driver.  This driver provides support for the
4# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
5
6# Add a set of useful warning flags and enable -Werror for CI to prevent
7# trivial mistakes from creeping in. We have to do this piecemeal as we reject
8# any patch that isn't warning clean, so turning on -Wall -Wextra (or W=1) we
9# need to filter out dubious warnings.  Still it is our interest
10# to keep running locally with W=1 C=1 until we are completely clean.
11#
12# Note the danger in using -Wall -Wextra is that when CI updates gcc we
13# will most likely get a sudden build breakage... Hopefully we will fix
14# new warnings before CI updates!
15subdir-ccflags-y := -Wall -Wextra
16subdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
17subdir-ccflags-y += $(call cc-disable-warning, type-limits)
18subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
19subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough)
20subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
21subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
22
23# Fine grained warnings disable
24CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init)
25CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init)
26
27subdir-ccflags-y += \
28	$(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
29
30# Please keep these build lists sorted!
31
32# core driver code
33i915-y := i915_drv.o \
34	  i915_irq.o \
35	  i915_memcpy.o \
36	  i915_mm.o \
37	  i915_params.o \
38	  i915_pci.o \
39          i915_suspend.o \
40	  i915_syncmap.o \
41	  i915_sw_fence.o \
42	  i915_sysfs.o \
43	  intel_csr.o \
44	  intel_device_info.o \
45	  intel_pm.o \
46	  intel_runtime_pm.o
47
48i915-$(CONFIG_COMPAT)   += i915_ioc32.o
49i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
50i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
51
52# GEM code
53i915-y += i915_cmd_parser.o \
54	  i915_gem_batch_pool.o \
55	  i915_gem_clflush.o \
56	  i915_gem_context.o \
57	  i915_gem_dmabuf.o \
58	  i915_gem_evict.o \
59	  i915_gem_execbuffer.o \
60	  i915_gem_fence_reg.o \
61	  i915_gem_gtt.o \
62	  i915_gem_internal.o \
63	  i915_gem.o \
64	  i915_gem_object.o \
65	  i915_gem_render_state.o \
66	  i915_gem_shrinker.o \
67	  i915_gem_stolen.o \
68	  i915_gem_tiling.o \
69	  i915_gem_timeline.o \
70	  i915_gem_userptr.o \
71	  i915_gemfs.o \
72	  i915_query.o \
73	  i915_request.o \
74	  i915_trace_points.o \
75	  i915_vma.o \
76	  intel_breadcrumbs.o \
77	  intel_engine_cs.o \
78	  intel_hangcheck.o \
79	  intel_lrc.o \
80	  intel_mocs.o \
81	  intel_ringbuffer.o \
82	  intel_uncore.o
83
84# general-purpose microcontroller (GuC) support
85i915-y += intel_uc.o \
86	  intel_uc_fw.o \
87	  intel_guc.o \
88	  intel_guc_ads.o \
89	  intel_guc_ct.o \
90	  intel_guc_fw.o \
91	  intel_guc_log.o \
92	  intel_guc_submission.o \
93	  intel_huc.o \
94	  intel_huc_fw.o
95
96# autogenerated null render state
97i915-y += intel_renderstate_gen6.o \
98	  intel_renderstate_gen7.o \
99	  intel_renderstate_gen8.o \
100	  intel_renderstate_gen9.o
101
102# modesetting core code
103i915-y += intel_audio.o \
104	  intel_atomic.o \
105	  intel_atomic_plane.o \
106	  intel_bios.o \
107	  intel_cdclk.o \
108	  intel_color.o \
109	  intel_display.o \
110	  intel_dpio_phy.o \
111	  intel_dpll_mgr.o \
112	  intel_fbc.o \
113	  intel_fifo_underrun.o \
114	  intel_frontbuffer.o \
115	  intel_hdcp.o \
116	  intel_hotplug.o \
117	  intel_modes.o \
118	  intel_overlay.o \
119	  intel_psr.o \
120	  intel_sideband.o \
121	  intel_sprite.o
122i915-$(CONFIG_ACPI)		+= intel_acpi.o intel_opregion.o
123i915-$(CONFIG_DRM_FBDEV_EMULATION)	+= intel_fbdev.o
124
125# modesetting output/encoder code
126i915-y += dvo_ch7017.o \
127	  dvo_ch7xxx.o \
128	  dvo_ivch.o \
129	  dvo_ns2501.o \
130	  dvo_sil164.o \
131	  dvo_tfp410.o \
132	  intel_crt.o \
133	  intel_ddi.o \
134	  intel_dp_aux_backlight.o \
135	  intel_dp_link_training.o \
136	  intel_dp_mst.o \
137	  intel_dp.o \
138	  intel_dsi.o \
139	  intel_dsi_dcs_backlight.o \
140	  intel_dsi_pll.o \
141	  intel_dsi_vbt.o \
142	  intel_dvo.o \
143	  intel_hdmi.o \
144	  intel_i2c.o \
145	  intel_lspcon.o \
146	  intel_lvds.o \
147	  intel_panel.o \
148	  intel_sdvo.o \
149	  intel_tv.o
150
151# Post-mortem debug and GPU hang state capture
152i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
153i915-$(CONFIG_DRM_I915_SELFTEST) += \
154	selftests/i915_random.o \
155	selftests/i915_selftest.o
156
157# virtual gpu code
158i915-y += i915_vgpu.o
159
160# perf code
161i915-y += i915_perf.o \
162	  i915_oa_hsw.o \
163	  i915_oa_bdw.o \
164	  i915_oa_chv.o \
165	  i915_oa_sklgt2.o \
166	  i915_oa_sklgt3.o \
167	  i915_oa_sklgt4.o \
168	  i915_oa_bxt.o \
169	  i915_oa_kblgt2.o \
170	  i915_oa_kblgt3.o \
171	  i915_oa_glk.o \
172	  i915_oa_cflgt2.o \
173	  i915_oa_cflgt3.o \
174	  i915_oa_cnl.o
175
176ifeq ($(CONFIG_DRM_I915_GVT),y)
177i915-y += intel_gvt.o
178include $(src)/gvt/Makefile
179endif
180
181# LPE Audio for VLV and CHT
182i915-y += intel_lpe_audio.o
183
184obj-$(CONFIG_DRM_I915) += i915.o
185