blob: e1ed526b96bf9445bdb4a22f2d11d85f4718fe84 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Dave Airliec0e09202008-05-29 10:09:59 +10002#
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
Chris Wilson39bf4de2017-10-24 19:15:47 +01006# 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!
Kees Cook0bb95f82018-06-25 15:59:34 -070015subdir-ccflags-y := -Wall -Wextra
Chris Wilson4ab09d02017-10-30 17:29:27 +000016subdir-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)
Chris Wilson6a05d292018-02-08 16:16:39 +000020subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
Matthias Kaehlcke46e20682018-05-01 11:24:40 -070021# 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)
Nathan Chancellorc5627462019-01-26 00:11:23 -070025subdir-ccflags-y += $(call cc-disable-warning, uninitialized)
Chris Wilson39bf4de2017-10-24 19:15:47 +010026subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror
27
28# Fine grained warnings disable
Chris Wilson4ab09d02017-10-30 17:29:27 +000029CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init)
30CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init)
Chris Wilson39bf4de2017-10-24 19:15:47 +010031
Chris Wilson0b1de5d2016-08-12 12:39:59 +010032subdir-ccflags-y += \
33 $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
Chris Wilson0a793ad2016-04-13 17:35:00 +010034
Jani Nikulac2400ec2019-04-03 16:52:36 +030035# Extra header tests
36include $(src)/Makefile.header-test
37
Chris Wilson112ed2d2019-04-24 18:48:39 +010038subdir-ccflags-y += -I$(src)
39
Daniel Vetter2fae6a82014-03-07 09:17:21 +010040# Please keep these build lists sorted!
41
42# core driver code
Jani Nikulac2400ec2019-04-03 16:52:36 +030043i915-y += i915_drv.o \
Daniel Vetter042794b2015-07-24 13:55:10 +020044 i915_irq.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +010045 i915_params.o \
Chris Wilson42f55512016-06-24 14:00:26 +010046 i915_pci.o \
Chris Wilson37d63f82019-05-28 10:29:50 +010047 i915_scatterlist.o \
Pedro Tammela79960222018-12-05 09:06:08 -020048 i915_suspend.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +010049 i915_sysfs.o \
Daniel Vetter042794b2015-07-24 13:55:10 +020050 intel_csr.o \
Chris Wilson94b4f3b2016-07-05 10:40:20 +010051 intel_device_info.o \
Daniel Vetter9c065a72014-09-30 10:56:38 +020052 intel_pm.o \
Oscar Mateo7d3c4252018-04-10 09:12:46 -070053 intel_runtime_pm.o \
Chris Wilsond91e6572019-04-24 21:07:13 +010054 intel_wakeref.o \
Chris Wilson112ed2d2019-04-24 18:48:39 +010055 intel_uncore.o
56
57# core library code
58i915-y += \
59 i915_memcpy.o \
60 i915_mm.o \
61 i915_sw_fence.o \
62 i915_syncmap.o \
63 i915_user_extensions.o
Daniel Vetter9c065a72014-09-30 10:56:38 +020064
Daniel Vetter2fae6a82014-03-07 09:17:21 +010065i915-$(CONFIG_COMPAT) += i915_ioc32.o
Tomeu Vizoso731035f2016-12-12 13:29:48 +010066i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
Tvrtko Ursulinb46a33e2017-11-21 18:18:45 +000067i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
Daniel Vetter2fae6a82014-03-07 09:17:21 +010068
Chris Wilson112ed2d2019-04-24 18:48:39 +010069# "Graphics Technology" (aka we talk to the gpu)
70obj-y += gt/
71gt-y += \
72 gt/intel_breadcrumbs.o \
73 gt/intel_context.o \
74 gt/intel_engine_cs.o \
Chris Wilson79ffac852019-04-24 21:07:17 +010075 gt/intel_engine_pm.o \
76 gt/intel_gt_pm.o \
Chris Wilson112ed2d2019-04-24 18:48:39 +010077 gt/intel_hangcheck.o \
78 gt/intel_lrc.o \
79 gt/intel_reset.o \
80 gt/intel_ringbuffer.o \
81 gt/intel_mocs.o \
82 gt/intel_sseu.o \
83 gt/intel_workarounds.o
84gt-$(CONFIG_DRM_I915_SELFTEST) += \
85 gt/mock_engine.o
86i915-y += $(gt-y)
87
88# GEM (Graphics Execution Management) code
Chris Wilson5e5d2e22019-05-28 10:29:42 +010089obj-y += gem/
Chris Wilson98932142019-05-28 10:29:44 +010090gem-y += \
Chris Wilson3f43c872019-05-28 10:29:53 +010091 gem/i915_gem_busy.o \
Chris Wilson10be98a2019-05-28 10:29:49 +010092 gem/i915_gem_clflush.o \
93 gem/i915_gem_context.o \
94 gem/i915_gem_dmabuf.o \
Chris Wilsonf0e4a062019-05-28 10:29:48 +010095 gem/i915_gem_domain.o \
Chris Wilson10be98a2019-05-28 10:29:49 +010096 gem/i915_gem_execbuffer.o \
Chris Wilson6951e582019-05-28 10:29:51 +010097 gem/i915_gem_fence.o \
Chris Wilson10be98a2019-05-28 10:29:49 +010098 gem/i915_gem_internal.o \
Chris Wilson84753552019-05-28 10:29:45 +010099 gem/i915_gem_object.o \
Chris Wilsonb414fcd2019-05-28 10:29:47 +0100100 gem/i915_gem_mman.o \
Chris Wilsonf0334282019-05-28 10:29:46 +0100101 gem/i915_gem_pages.o \
102 gem/i915_gem_phys.o \
Chris Wilson10be98a2019-05-28 10:29:49 +0100103 gem/i915_gem_pm.o \
104 gem/i915_gem_shmem.o \
105 gem/i915_gem_shrinker.o \
106 gem/i915_gem_stolen.o \
107 gem/i915_gem_tiling.o \
108 gem/i915_gem_userptr.o \
Chris Wilsond45a1a52019-05-28 10:29:52 +0100109 gem/i915_gem_wait.o \
Chris Wilson10be98a2019-05-28 10:29:49 +0100110 gem/i915_gemfs.o
Chris Wilson64d6c502019-02-05 13:00:02 +0000111i915-y += \
Chris Wilson98932142019-05-28 10:29:44 +0100112 $(gem-y) \
Chris Wilson64d6c502019-02-05 13:00:02 +0000113 i915_active.o \
114 i915_cmd_parser.o \
Brad Volkin493018d2014-12-11 12:13:08 -0800115 i915_gem_batch_pool.o \
Chris Wilsonb47eb4a2010-08-07 11:01:23 +0100116 i915_gem_evict.o \
Joonas Lahtinenb42fe9c2016-11-11 12:43:54 +0200117 i915_gem_fence_reg.o \
Chris Wilson54cf91d2010-11-25 18:00:26 +0000118 i915_gem_gtt.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100119 i915_gem.o \
Daniel Vetter042794b2015-07-24 13:55:10 +0200120 i915_gem_render_state.o \
Chris Wilson32eb6bc2019-02-28 10:20:33 +0000121 i915_globals.o \
Lionel Landwerlina446ae22018-03-06 12:28:56 +0000122 i915_query.o \
Chris Wilsone61e0f52018-02-21 09:56:36 +0000123 i915_request.o \
Chris Wilsone2f34962018-10-01 15:47:54 +0100124 i915_scheduler.o \
Chris Wilsona89d1f92018-05-02 17:38:39 +0100125 i915_timeline.o \
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100126 i915_trace_points.o \
Joonas Lahtinenb42fe9c2016-11-11 12:43:54 +0200127 i915_vma.o \
Jackie Li6b0478f2018-03-13 17:32:50 -0700128 intel_wopcm.o
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100129
Alex Dai33a732f2015-08-12 15:43:36 +0100130# general-purpose microcontroller (GuC) support
Arkadiusz Hiler2d803c22016-11-25 18:59:35 +0100131i915-y += intel_uc.o \
Michal Wajdeczkoa16b4312017-10-04 15:33:25 +0000132 intel_uc_fw.o \
Michal Wajdeczko9bf384c2017-10-04 18:13:41 +0000133 intel_guc.o \
Sujaritha Sundaresanc24f0c12018-01-02 13:20:24 -0800134 intel_guc_ads.o \
Michal Wajdeczkof8a58d62017-05-26 11:13:25 +0000135 intel_guc_ct.o \
Michal Wajdeczkoe8668bb2017-10-16 14:47:14 +0000136 intel_guc_fw.o \
Sagar Arun Kamblea2695742017-11-16 19:02:41 +0530137 intel_guc_log.o \
138 intel_guc_submission.o \
Sagar Arun Kamble57312ea2018-03-01 22:15:45 +0530139 intel_huc.o \
140 intel_huc_fw.o
Alex Dai33a732f2015-08-12 15:43:36 +0100141
Mika Kuoppala9d0a6fa2014-05-14 17:02:16 +0300142# autogenerated null render state
143i915-y += intel_renderstate_gen6.o \
144 intel_renderstate_gen7.o \
Armin Reeseff7a60f2014-10-23 08:34:28 -0700145 intel_renderstate_gen8.o \
146 intel_renderstate_gen9.o
Mika Kuoppala9d0a6fa2014-05-14 17:02:16 +0300147
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100148# modesetting core code
Jani Nikula7c10a2b2014-10-27 16:26:43 +0200149i915-y += intel_audio.o \
Daniel Vetter042794b2015-07-24 13:55:10 +0200150 intel_atomic.o \
151 intel_atomic_plane.o \
Jani Nikula7c10a2b2014-10-27 16:26:43 +0200152 intel_bios.o \
Ville Syrjäläc457d9c2019-05-24 18:36:14 +0300153 intel_bw.o \
Ville Syrjälä7ff89ca2017-02-07 20:33:05 +0200154 intel_cdclk.o \
Lionel Landwerlin8563b1e2016-03-16 10:57:14 +0000155 intel_color.o \
Imre Deakc45198b2018-11-06 18:06:18 +0200156 intel_combo_phy.o \
Jani Nikula360fa662018-10-10 10:52:04 +0300157 intel_connector.o \
Jesse Barnes79e53942008-11-07 14:24:08 -0800158 intel_display.o \
Ander Conselvan de Oliveirab7fa22d2016-04-27 15:44:17 +0300159 intel_dpio_phy.o \
Ander Conselvan de Oliveira7abd4b32016-03-08 17:46:15 +0200160 intel_dpll_mgr.o \
Rodrigo Vivi7ff0ebc2014-12-08 14:09:10 -0200161 intel_fbc.o \
Daniel Vetter47339cd2014-09-30 10:56:46 +0200162 intel_fifo_underrun.o \
Daniel Vetterb680c372014-09-19 18:27:27 +0200163 intel_frontbuffer.o \
Sean Paulee5e5e72018-01-08 14:55:39 -0500164 intel_hdcp.o \
Daniel Vetter042794b2015-07-24 13:55:10 +0200165 intel_hotplug.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100166 intel_overlay.o \
Rodrigo Vivi0bc12bc2014-11-14 08:52:28 -0800167 intel_psr.o \
Jani Nikula593a21a2018-10-16 17:42:27 +0300168 intel_quirks.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100169 intel_sideband.o \
170 intel_sprite.o
Daniel Vettere19b9132014-03-18 09:43:56 +0100171i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o
Daniel Vetter06957262015-08-10 13:34:08 +0200172i915-$(CONFIG_DRM_FBDEV_EMULATION) += intel_fbdev.o
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100173
174# modesetting output/encoder code
175i915-y += dvo_ch7017.o \
176 dvo_ch7xxx.o \
177 dvo_ivch.o \
178 dvo_ns2501.o \
179 dvo_sil164.o \
180 dvo_tfp410.o \
Madhav Chauhanfcfe0bd2018-07-05 19:19:33 +0530181 icl_dsi.o \
Jesse Barnes79e53942008-11-07 14:24:08 -0800182 intel_crt.o \
Eugeni Dodonov45244b82012-05-09 15:37:20 -0300183 intel_ddi.o \
Yetunde Adebisie7156c82016-04-05 15:10:52 +0100184 intel_dp_aux_backlight.o \
Ander Conselvan de Oliveira94223d02015-10-23 13:01:48 +0300185 intel_dp_link_training.o \
Dave Airlie0e32b392014-05-02 14:02:48 +1000186 intel_dp_mst.o \
Daniel Vetter042794b2015-07-24 13:55:10 +0200187 intel_dp.o \
Jani Nikula2bf3f592018-10-15 17:27:50 +0300188 intel_dsi.o \
Jani Nikula90198352016-04-26 16:14:25 +0300189 intel_dsi_dcs_backlight.o \
Jani Nikula5431fc02017-03-06 16:31:29 +0200190 intel_dsi_vbt.o \
Jesse Barnes79e53942008-11-07 14:24:08 -0800191 intel_dvo.o \
Jani Nikula3ce2ea62019-05-02 18:02:47 +0300192 intel_gmbus.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100193 intel_hdmi.o \
Shashank Sharmadbe9e612016-10-14 19:56:49 +0530194 intel_lspcon.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100195 intel_lvds.o \
196 intel_panel.o \
197 intel_sdvo.o \
Jani Nikulaca3589c2018-07-05 16:25:07 +0300198 intel_tv.o \
199 vlv_dsi.o \
Gaurav K Singh168243c2018-11-29 11:38:27 -0800200 vlv_dsi_pll.o \
201 intel_vdsc.o
Dave Airliec0e09202008-05-29 10:09:59 +1000202
Chris Wilson98a2f412016-10-12 10:05:18 +0100203# Post-mortem debug and GPU hang state capture
204i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
Chris Wilson953c7f82017-02-13 17:15:12 +0000205i915-$(CONFIG_DRM_I915_SELFTEST) += \
Chris Wilson10be98a2019-05-28 10:29:49 +0100206 gem/selftests/igt_gem_utils.o \
Chris Wilson953c7f82017-02-13 17:15:12 +0000207 selftests/i915_random.o \
Chris Wilson98dc0452018-05-05 10:10:13 +0100208 selftests/i915_selftest.o \
Tvrtko Ursulin8d2f6e22018-11-30 08:02:53 +0000209 selftests/igt_flush_test.o \
Chris Wilsone4a8c812019-01-21 22:20:47 +0000210 selftests/igt_live_test.o \
Tvrtko Ursulin28d6ccc2018-12-03 12:50:11 +0000211 selftests/igt_reset.o \
Tvrtko Ursulin8d2f6e22018-11-30 08:02:53 +0000212 selftests/igt_spinner.o
Chris Wilson98a2f412016-10-12 10:05:18 +0100213
Yu Zhangcf9d2892015-02-10 19:05:47 +0800214# virtual gpu code
215i915-y += i915_vgpu.o
216
Robert Braggeec688e2016-11-07 19:49:47 +0000217# perf code
Robert Bragg8a3003d2016-11-07 19:49:51 +0000218i915-y += i915_perf.o \
Robert Bragg5182f642017-06-13 12:23:02 +0100219 i915_oa_hsw.o \
220 i915_oa_bdw.o \
221 i915_oa_chv.o \
222 i915_oa_sklgt2.o \
223 i915_oa_sklgt3.o \
224 i915_oa_sklgt4.o \
Lionel Landwerlin6c5c1d82017-06-13 12:23:08 +0100225 i915_oa_bxt.o \
226 i915_oa_kblgt2.o \
Lionel Landwerlin28c7ef92017-06-13 12:23:09 +0100227 i915_oa_kblgt3.o \
Lionel Landwerlin22ea4f32017-09-18 12:21:24 +0100228 i915_oa_glk.o \
Lionel Landwerlin4407eaa2017-11-10 19:08:40 +0000229 i915_oa_cflgt2.o \
Lionel Landwerlin95690a02017-11-10 19:08:43 +0000230 i915_oa_cflgt3.o \
Lionel Landwerlin1de401c2018-03-26 14:39:48 +0100231 i915_oa_cnl.o \
232 i915_oa_icl.o
Robert Braggeec688e2016-11-07 19:49:47 +0000233
Zhi Wang0ad35fe2016-06-16 08:07:00 -0400234ifeq ($(CONFIG_DRM_I915_GVT),y)
235i915-y += intel_gvt.o
236include $(src)/gvt/Makefile
237endif
238
Jerome Anandeef57322017-01-25 04:27:49 +0530239# LPE Audio for VLV and CHT
240i915-y += intel_lpe_audio.o
241
Chris Wilsonc58305a2016-08-19 16:54:28 +0100242obj-$(CONFIG_DRM_I915) += i915.o
Zhenyu Wang9bdb0732018-12-07 16:16:53 +0800243obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o