blob: 4c14628dc943a7650038e267cc5b15a8babe85fd [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 \
Pedro Tammela79960222018-12-05 09:06:08 -020047 i915_suspend.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +010048 i915_sysfs.o \
Daniel Vetter042794b2015-07-24 13:55:10 +020049 intel_csr.o \
Chris Wilson94b4f3b2016-07-05 10:40:20 +010050 intel_device_info.o \
Daniel Vetter9c065a72014-09-30 10:56:38 +020051 intel_pm.o \
Oscar Mateo7d3c4252018-04-10 09:12:46 -070052 intel_runtime_pm.o \
Chris Wilsond91e6572019-04-24 21:07:13 +010053 intel_wakeref.o \
Chris Wilson112ed2d2019-04-24 18:48:39 +010054 intel_uncore.o
55
56# core library code
57i915-y += \
58 i915_memcpy.o \
59 i915_mm.o \
60 i915_sw_fence.o \
61 i915_syncmap.o \
62 i915_user_extensions.o
Daniel Vetter9c065a72014-09-30 10:56:38 +020063
Daniel Vetter2fae6a82014-03-07 09:17:21 +010064i915-$(CONFIG_COMPAT) += i915_ioc32.o
Tomeu Vizoso731035f2016-12-12 13:29:48 +010065i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o intel_pipe_crc.o
Tvrtko Ursulinb46a33e2017-11-21 18:18:45 +000066i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
Daniel Vetter2fae6a82014-03-07 09:17:21 +010067
Chris Wilson112ed2d2019-04-24 18:48:39 +010068# "Graphics Technology" (aka we talk to the gpu)
69obj-y += gt/
70gt-y += \
71 gt/intel_breadcrumbs.o \
72 gt/intel_context.o \
73 gt/intel_engine_cs.o \
Chris Wilson79ffac852019-04-24 21:07:17 +010074 gt/intel_engine_pm.o \
75 gt/intel_gt_pm.o \
Chris Wilson112ed2d2019-04-24 18:48:39 +010076 gt/intel_hangcheck.o \
77 gt/intel_lrc.o \
78 gt/intel_reset.o \
79 gt/intel_ringbuffer.o \
80 gt/intel_mocs.o \
81 gt/intel_sseu.o \
82 gt/intel_workarounds.o
83gt-$(CONFIG_DRM_I915_SELFTEST) += \
84 gt/mock_engine.o
85i915-y += $(gt-y)
86
87# GEM (Graphics Execution Management) code
Chris Wilson5e5d2e22019-05-28 10:29:42 +010088obj-y += gem/
Chris Wilson98932142019-05-28 10:29:44 +010089gem-y += \
Chris Wilson84753552019-05-28 10:29:45 +010090 gem/i915_gem_object.o \
Chris Wilsonb414fcd2019-05-28 10:29:47 +010091 gem/i915_gem_mman.o \
Chris Wilsonf0334282019-05-28 10:29:46 +010092 gem/i915_gem_pages.o \
93 gem/i915_gem_phys.o \
Chris Wilson84753552019-05-28 10:29:45 +010094 gem/i915_gem_shmem.o
Chris Wilson64d6c502019-02-05 13:00:02 +000095i915-y += \
Chris Wilson98932142019-05-28 10:29:44 +010096 $(gem-y) \
Chris Wilson64d6c502019-02-05 13:00:02 +000097 i915_active.o \
98 i915_cmd_parser.o \
Brad Volkin493018d2014-12-11 12:13:08 -080099 i915_gem_batch_pool.o \
Chris Wilson57822dc2017-02-22 11:40:48 +0000100 i915_gem_clflush.o \
Ben Widawsky254f9652012-06-04 14:42:42 -0700101 i915_gem_context.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100102 i915_gem_dmabuf.o \
Chris Wilsonb47eb4a2010-08-07 11:01:23 +0100103 i915_gem_evict.o \
Chris Wilson54cf91d2010-11-25 18:00:26 +0000104 i915_gem_execbuffer.o \
Joonas Lahtinenb42fe9c2016-11-11 12:43:54 +0200105 i915_gem_fence_reg.o \
Chris Wilson54cf91d2010-11-25 18:00:26 +0000106 i915_gem_gtt.o \
Chris Wilson920cf412016-10-28 13:58:30 +0100107 i915_gem_internal.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100108 i915_gem.o \
Chris Wilson23c3c3d2019-04-24 21:07:14 +0100109 i915_gem_pm.o \
Daniel Vetter042794b2015-07-24 13:55:10 +0200110 i915_gem_render_state.o \
Daniel Vetterbe6a0372015-03-18 10:46:04 +0100111 i915_gem_shrinker.o \
Chris Wilson9797fbf2012-04-24 15:47:39 +0100112 i915_gem_stolen.o \
Jesse Barnes79e53942008-11-07 14:24:08 -0800113 i915_gem_tiling.o \
Chris Wilson5cc9ed42014-05-16 14:22:37 +0100114 i915_gem_userptr.o \
Matthew Auld465c4032017-10-06 23:18:14 +0100115 i915_gemfs.o \
Chris Wilson32eb6bc2019-02-28 10:20:33 +0000116 i915_globals.o \
Lionel Landwerlina446ae22018-03-06 12:28:56 +0000117 i915_query.o \
Chris Wilsone61e0f52018-02-21 09:56:36 +0000118 i915_request.o \
Chris Wilsone2f34962018-10-01 15:47:54 +0100119 i915_scheduler.o \
Chris Wilsona89d1f92018-05-02 17:38:39 +0100120 i915_timeline.o \
Chris Wilson1c5d22f2009-08-25 11:15:50 +0100121 i915_trace_points.o \
Joonas Lahtinenb42fe9c2016-11-11 12:43:54 +0200122 i915_vma.o \
Jackie Li6b0478f2018-03-13 17:32:50 -0700123 intel_wopcm.o
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100124
Alex Dai33a732f2015-08-12 15:43:36 +0100125# general-purpose microcontroller (GuC) support
Arkadiusz Hiler2d803c22016-11-25 18:59:35 +0100126i915-y += intel_uc.o \
Michal Wajdeczkoa16b4312017-10-04 15:33:25 +0000127 intel_uc_fw.o \
Michal Wajdeczko9bf384c2017-10-04 18:13:41 +0000128 intel_guc.o \
Sujaritha Sundaresanc24f0c12018-01-02 13:20:24 -0800129 intel_guc_ads.o \
Michal Wajdeczkof8a58d62017-05-26 11:13:25 +0000130 intel_guc_ct.o \
Michal Wajdeczkoe8668bb2017-10-16 14:47:14 +0000131 intel_guc_fw.o \
Sagar Arun Kamblea2695742017-11-16 19:02:41 +0530132 intel_guc_log.o \
133 intel_guc_submission.o \
Sagar Arun Kamble57312ea2018-03-01 22:15:45 +0530134 intel_huc.o \
135 intel_huc_fw.o
Alex Dai33a732f2015-08-12 15:43:36 +0100136
Mika Kuoppala9d0a6fa2014-05-14 17:02:16 +0300137# autogenerated null render state
138i915-y += intel_renderstate_gen6.o \
139 intel_renderstate_gen7.o \
Armin Reeseff7a60f2014-10-23 08:34:28 -0700140 intel_renderstate_gen8.o \
141 intel_renderstate_gen9.o
Mika Kuoppala9d0a6fa2014-05-14 17:02:16 +0300142
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100143# modesetting core code
Jani Nikula7c10a2b2014-10-27 16:26:43 +0200144i915-y += intel_audio.o \
Daniel Vetter042794b2015-07-24 13:55:10 +0200145 intel_atomic.o \
146 intel_atomic_plane.o \
Jani Nikula7c10a2b2014-10-27 16:26:43 +0200147 intel_bios.o \
Ville Syrjäläc457d9c2019-05-24 18:36:14 +0300148 intel_bw.o \
Ville Syrjälä7ff89ca2017-02-07 20:33:05 +0200149 intel_cdclk.o \
Lionel Landwerlin8563b1e2016-03-16 10:57:14 +0000150 intel_color.o \
Imre Deakc45198b2018-11-06 18:06:18 +0200151 intel_combo_phy.o \
Jani Nikula360fa662018-10-10 10:52:04 +0300152 intel_connector.o \
Jesse Barnes79e53942008-11-07 14:24:08 -0800153 intel_display.o \
Ander Conselvan de Oliveirab7fa22d2016-04-27 15:44:17 +0300154 intel_dpio_phy.o \
Ander Conselvan de Oliveira7abd4b32016-03-08 17:46:15 +0200155 intel_dpll_mgr.o \
Rodrigo Vivi7ff0ebc2014-12-08 14:09:10 -0200156 intel_fbc.o \
Daniel Vetter47339cd2014-09-30 10:56:46 +0200157 intel_fifo_underrun.o \
Daniel Vetterb680c372014-09-19 18:27:27 +0200158 intel_frontbuffer.o \
Sean Paulee5e5e72018-01-08 14:55:39 -0500159 intel_hdcp.o \
Daniel Vetter042794b2015-07-24 13:55:10 +0200160 intel_hotplug.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100161 intel_overlay.o \
Rodrigo Vivi0bc12bc2014-11-14 08:52:28 -0800162 intel_psr.o \
Jani Nikula593a21a2018-10-16 17:42:27 +0300163 intel_quirks.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100164 intel_sideband.o \
165 intel_sprite.o
Daniel Vettere19b9132014-03-18 09:43:56 +0100166i915-$(CONFIG_ACPI) += intel_acpi.o intel_opregion.o
Daniel Vetter06957262015-08-10 13:34:08 +0200167i915-$(CONFIG_DRM_FBDEV_EMULATION) += intel_fbdev.o
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100168
169# modesetting output/encoder code
170i915-y += dvo_ch7017.o \
171 dvo_ch7xxx.o \
172 dvo_ivch.o \
173 dvo_ns2501.o \
174 dvo_sil164.o \
175 dvo_tfp410.o \
Madhav Chauhanfcfe0bd2018-07-05 19:19:33 +0530176 icl_dsi.o \
Jesse Barnes79e53942008-11-07 14:24:08 -0800177 intel_crt.o \
Eugeni Dodonov45244b82012-05-09 15:37:20 -0300178 intel_ddi.o \
Yetunde Adebisie7156c82016-04-05 15:10:52 +0100179 intel_dp_aux_backlight.o \
Ander Conselvan de Oliveira94223d02015-10-23 13:01:48 +0300180 intel_dp_link_training.o \
Dave Airlie0e32b392014-05-02 14:02:48 +1000181 intel_dp_mst.o \
Daniel Vetter042794b2015-07-24 13:55:10 +0200182 intel_dp.o \
Jani Nikula2bf3f592018-10-15 17:27:50 +0300183 intel_dsi.o \
Jani Nikula90198352016-04-26 16:14:25 +0300184 intel_dsi_dcs_backlight.o \
Jani Nikula5431fc02017-03-06 16:31:29 +0200185 intel_dsi_vbt.o \
Jesse Barnes79e53942008-11-07 14:24:08 -0800186 intel_dvo.o \
Jani Nikula3ce2ea62019-05-02 18:02:47 +0300187 intel_gmbus.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100188 intel_hdmi.o \
Shashank Sharmadbe9e612016-10-14 19:56:49 +0530189 intel_lspcon.o \
Daniel Vetter2fae6a82014-03-07 09:17:21 +0100190 intel_lvds.o \
191 intel_panel.o \
192 intel_sdvo.o \
Jani Nikulaca3589c2018-07-05 16:25:07 +0300193 intel_tv.o \
194 vlv_dsi.o \
Gaurav K Singh168243c2018-11-29 11:38:27 -0800195 vlv_dsi_pll.o \
196 intel_vdsc.o
Dave Airliec0e09202008-05-29 10:09:59 +1000197
Chris Wilson98a2f412016-10-12 10:05:18 +0100198# Post-mortem debug and GPU hang state capture
199i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o
Chris Wilson953c7f82017-02-13 17:15:12 +0000200i915-$(CONFIG_DRM_I915_SELFTEST) += \
201 selftests/i915_random.o \
Chris Wilson98dc0452018-05-05 10:10:13 +0100202 selftests/i915_selftest.o \
Tvrtko Ursulin8d2f6e22018-11-30 08:02:53 +0000203 selftests/igt_flush_test.o \
Chris Wilson46472b32019-04-26 17:33:36 +0100204 selftests/igt_gem_utils.o \
Chris Wilsone4a8c812019-01-21 22:20:47 +0000205 selftests/igt_live_test.o \
Tvrtko Ursulin28d6ccc2018-12-03 12:50:11 +0000206 selftests/igt_reset.o \
Tvrtko Ursulin8d2f6e22018-11-30 08:02:53 +0000207 selftests/igt_spinner.o
Chris Wilson98a2f412016-10-12 10:05:18 +0100208
Yu Zhangcf9d2892015-02-10 19:05:47 +0800209# virtual gpu code
210i915-y += i915_vgpu.o
211
Robert Braggeec688e2016-11-07 19:49:47 +0000212# perf code
Robert Bragg8a3003d2016-11-07 19:49:51 +0000213i915-y += i915_perf.o \
Robert Bragg5182f642017-06-13 12:23:02 +0100214 i915_oa_hsw.o \
215 i915_oa_bdw.o \
216 i915_oa_chv.o \
217 i915_oa_sklgt2.o \
218 i915_oa_sklgt3.o \
219 i915_oa_sklgt4.o \
Lionel Landwerlin6c5c1d82017-06-13 12:23:08 +0100220 i915_oa_bxt.o \
221 i915_oa_kblgt2.o \
Lionel Landwerlin28c7ef92017-06-13 12:23:09 +0100222 i915_oa_kblgt3.o \
Lionel Landwerlin22ea4f32017-09-18 12:21:24 +0100223 i915_oa_glk.o \
Lionel Landwerlin4407eaa2017-11-10 19:08:40 +0000224 i915_oa_cflgt2.o \
Lionel Landwerlin95690a02017-11-10 19:08:43 +0000225 i915_oa_cflgt3.o \
Lionel Landwerlin1de401c2018-03-26 14:39:48 +0100226 i915_oa_cnl.o \
227 i915_oa_icl.o
Robert Braggeec688e2016-11-07 19:49:47 +0000228
Zhi Wang0ad35fe2016-06-16 08:07:00 -0400229ifeq ($(CONFIG_DRM_I915_GVT),y)
230i915-y += intel_gvt.o
231include $(src)/gvt/Makefile
232endif
233
Jerome Anandeef57322017-01-25 04:27:49 +0530234# LPE Audio for VLV and CHT
235i915-y += intel_lpe_audio.o
236
Chris Wilsonc58305a2016-08-19 16:54:28 +0100237obj-$(CONFIG_DRM_I915) += i915.o
Zhenyu Wang9bdb0732018-12-07 16:16:53 +0800238obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o