xref: /openbmc/linux/drivers/gpu/drm/i915/Makefile (revision ebd09753)
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)
21# clang warnings
22subdir-ccflags-y += $(call cc-disable-warning, sign-compare)
23subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
24subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
25subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
26
27# Fine grained warnings disable
28CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init)
29CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init)
30
31subdir-ccflags-y += \
32	$(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
33
34# Please keep these build lists sorted!
35
36# core driver code
37i915-y := i915_drv.o \
38	  i915_irq.o \
39	  i915_memcpy.o \
40	  i915_mm.o \
41	  i915_params.o \
42	  i915_pci.o \
43          i915_suspend.o \
44	  i915_syncmap.o \
45	  i915_sw_fence.o \
46	  i915_sysfs.o \
47	  intel_csr.o \
48	  intel_device_info.o \
49	  intel_pm.o \
50	  intel_runtime_pm.o \
51	  intel_workarounds.o
52
53i915-$(CONFIG_COMPAT)   += i915_ioc32.o
54i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
55i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
56
57# GEM code
58i915-y += i915_cmd_parser.o \
59	  i915_gem_batch_pool.o \
60	  i915_gem_clflush.o \
61	  i915_gem_context.o \
62	  i915_gem_dmabuf.o \
63	  i915_gem_evict.o \
64	  i915_gem_execbuffer.o \
65	  i915_gem_fence_reg.o \
66	  i915_gem_gtt.o \
67	  i915_gem_internal.o \
68	  i915_gem.o \
69	  i915_gem_object.o \
70	  i915_gem_render_state.o \
71	  i915_gem_shrinker.o \
72	  i915_gem_stolen.o \
73	  i915_gem_tiling.o \
74	  i915_gem_userptr.o \
75	  i915_gemfs.o \
76	  i915_query.o \
77	  i915_request.o \
78	  i915_timeline.o \
79	  i915_trace_points.o \
80	  i915_vma.o \
81	  intel_breadcrumbs.o \
82	  intel_engine_cs.o \
83	  intel_hangcheck.o \
84	  intel_lrc.o \
85	  intel_mocs.o \
86	  intel_ringbuffer.o \
87	  intel_uncore.o \
88	  intel_wopcm.o
89
90# general-purpose microcontroller (GuC) support
91i915-y += intel_uc.o \
92	  intel_uc_fw.o \
93	  intel_guc.o \
94	  intel_guc_ads.o \
95	  intel_guc_ct.o \
96	  intel_guc_fw.o \
97	  intel_guc_log.o \
98	  intel_guc_submission.o \
99	  intel_huc.o \
100	  intel_huc_fw.o
101
102# autogenerated null render state
103i915-y += intel_renderstate_gen6.o \
104	  intel_renderstate_gen7.o \
105	  intel_renderstate_gen8.o \
106	  intel_renderstate_gen9.o
107
108# modesetting core code
109i915-y += intel_audio.o \
110	  intel_atomic.o \
111	  intel_atomic_plane.o \
112	  intel_bios.o \
113	  intel_cdclk.o \
114	  intel_color.o \
115	  intel_display.o \
116	  intel_dpio_phy.o \
117	  intel_dpll_mgr.o \
118	  intel_fbc.o \
119	  intel_fifo_underrun.o \
120	  intel_frontbuffer.o \
121	  intel_hdcp.o \
122	  intel_hotplug.o \
123	  intel_modes.o \
124	  intel_overlay.o \
125	  intel_psr.o \
126	  intel_sideband.o \
127	  intel_sprite.o
128i915-$(CONFIG_ACPI)		+= intel_acpi.o intel_opregion.o
129i915-$(CONFIG_DRM_FBDEV_EMULATION)	+= intel_fbdev.o
130
131# modesetting output/encoder code
132i915-y += dvo_ch7017.o \
133	  dvo_ch7xxx.o \
134	  dvo_ivch.o \
135	  dvo_ns2501.o \
136	  dvo_sil164.o \
137	  dvo_tfp410.o \
138	  icl_dsi.o \
139	  intel_crt.o \
140	  intel_ddi.o \
141	  intel_dp_aux_backlight.o \
142	  intel_dp_link_training.o \
143	  intel_dp_mst.o \
144	  intel_dp.o \
145	  intel_dsi_dcs_backlight.o \
146	  intel_dsi_vbt.o \
147	  intel_dvo.o \
148	  intel_hdmi.o \
149	  intel_i2c.o \
150	  intel_lspcon.o \
151	  intel_lvds.o \
152	  intel_panel.o \
153	  intel_sdvo.o \
154	  intel_tv.o \
155	  vlv_dsi.o \
156	  vlv_dsi_pll.o
157
158# Post-mortem debug and GPU hang state capture
159i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
160i915-$(CONFIG_DRM_I915_SELFTEST) += \
161	selftests/i915_random.o \
162	selftests/i915_selftest.o \
163	selftests/igt_flush_test.o
164
165# virtual gpu code
166i915-y += i915_vgpu.o
167
168# perf code
169i915-y += i915_perf.o \
170	  i915_oa_hsw.o \
171	  i915_oa_bdw.o \
172	  i915_oa_chv.o \
173	  i915_oa_sklgt2.o \
174	  i915_oa_sklgt3.o \
175	  i915_oa_sklgt4.o \
176	  i915_oa_bxt.o \
177	  i915_oa_kblgt2.o \
178	  i915_oa_kblgt3.o \
179	  i915_oa_glk.o \
180	  i915_oa_cflgt2.o \
181	  i915_oa_cflgt3.o \
182	  i915_oa_cnl.o \
183	  i915_oa_icl.o
184
185ifeq ($(CONFIG_DRM_I915_GVT),y)
186i915-y += intel_gvt.o
187include $(src)/gvt/Makefile
188endif
189
190# LPE Audio for VLV and CHT
191i915-y += intel_lpe_audio.o
192
193obj-$(CONFIG_DRM_I915) += i915.o
194