Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Dave Airlie | c0e0920 | 2008-05-29 10:09:59 +1000 | [diff] [blame] | 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 | |
Chris Wilson | 39bf4de | 2017-10-24 19:15:47 +0100 | [diff] [blame] | 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! |
Kees Cook | 0bb95f8 | 2018-06-25 15:59:34 -0700 | [diff] [blame] | 15 | subdir-ccflags-y := -Wall -Wextra |
Chris Wilson | 4ab09d0 | 2017-10-30 17:29:27 +0000 | [diff] [blame] | 16 | subdir-ccflags-y += $(call cc-disable-warning, unused-parameter) |
| 17 | subdir-ccflags-y += $(call cc-disable-warning, type-limits) |
| 18 | subdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers) |
| 19 | subdir-ccflags-y += $(call cc-disable-warning, implicit-fallthrough) |
Chris Wilson | 6a05d29 | 2018-02-08 16:16:39 +0000 | [diff] [blame] | 20 | subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable) |
Matthias Kaehlcke | 46e2068 | 2018-05-01 11:24:40 -0700 | [diff] [blame] | 21 | # clang warnings |
| 22 | subdir-ccflags-y += $(call cc-disable-warning, sign-compare) |
| 23 | subdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized) |
| 24 | subdir-ccflags-y += $(call cc-disable-warning, initializer-overrides) |
Nathan Chancellor | c562746 | 2019-01-26 00:11:23 -0700 | [diff] [blame] | 25 | subdir-ccflags-y += $(call cc-disable-warning, uninitialized) |
Chris Wilson | 39bf4de | 2017-10-24 19:15:47 +0100 | [diff] [blame] | 26 | subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror |
| 27 | |
| 28 | # Fine grained warnings disable |
Chris Wilson | 4ab09d0 | 2017-10-30 17:29:27 +0000 | [diff] [blame] | 29 | CFLAGS_i915_pci.o = $(call cc-disable-warning, override-init) |
| 30 | CFLAGS_intel_fbdev.o = $(call cc-disable-warning, override-init) |
Chris Wilson | 39bf4de | 2017-10-24 19:15:47 +0100 | [diff] [blame] | 31 | |
Chris Wilson | 0b1de5d | 2016-08-12 12:39:59 +0100 | [diff] [blame] | 32 | subdir-ccflags-y += \ |
| 33 | $(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA) |
Chris Wilson | 0a793ad | 2016-04-13 17:35:00 +0100 | [diff] [blame] | 34 | |
Jani Nikula | c2400ec | 2019-04-03 16:52:36 +0300 | [diff] [blame] | 35 | # Extra header tests |
Jani Nikula | 1032a2a | 2019-07-29 17:08:47 +0300 | [diff] [blame^] | 36 | header-test-pattern-$(CONFIG_DRM_I915_WERROR) := *.h |
Jani Nikula | c2400ec | 2019-04-03 16:52:36 +0300 | [diff] [blame] | 37 | |
Jani Nikula | 9ef424e | 2019-06-26 17:36:17 +0300 | [diff] [blame] | 38 | subdir-ccflags-y += -I$(srctree)/$(src) |
Chris Wilson | 112ed2d | 2019-04-24 18:48:39 +0100 | [diff] [blame] | 39 | |
Daniel Vetter | 2fae6a8 | 2014-03-07 09:17:21 +0100 | [diff] [blame] | 40 | # Please keep these build lists sorted! |
| 41 | |
| 42 | # core driver code |
Jani Nikula | c2400ec | 2019-04-03 16:52:36 +0300 | [diff] [blame] | 43 | i915-y += i915_drv.o \ |
Daniel Vetter | 042794b | 2015-07-24 13:55:10 +0200 | [diff] [blame] | 44 | i915_irq.o \ |
Daniel Vetter | 2fae6a8 | 2014-03-07 09:17:21 +0100 | [diff] [blame] | 45 | i915_params.o \ |
Chris Wilson | 42f5551 | 2016-06-24 14:00:26 +0100 | [diff] [blame] | 46 | i915_pci.o \ |
Chris Wilson | 37d63f8 | 2019-05-28 10:29:50 +0100 | [diff] [blame] | 47 | i915_scatterlist.o \ |
Pedro Tammela | 7996022 | 2018-12-05 09:06:08 -0200 | [diff] [blame] | 48 | i915_suspend.o \ |
Daniel Vetter | 2fae6a8 | 2014-03-07 09:17:21 +0100 | [diff] [blame] | 49 | i915_sysfs.o \ |
Daniel Vetter | 042794b | 2015-07-24 13:55:10 +0200 | [diff] [blame] | 50 | intel_csr.o \ |
Chris Wilson | 94b4f3b | 2016-07-05 10:40:20 +0100 | [diff] [blame] | 51 | intel_device_info.o \ |
Daniel Vetter | 9c065a7 | 2014-09-30 10:56:38 +0200 | [diff] [blame] | 52 | intel_pm.o \ |
Oscar Mateo | 7d3c425 | 2018-04-10 09:12:46 -0700 | [diff] [blame] | 53 | intel_runtime_pm.o \ |
Jani Nikula | df0566a | 2019-06-13 11:44:16 +0300 | [diff] [blame] | 54 | intel_sideband.o \ |
| 55 | intel_uncore.o \ |
| 56 | intel_wakeref.o |
Chris Wilson | 112ed2d | 2019-04-24 18:48:39 +0100 | [diff] [blame] | 57 | |
| 58 | # core library code |
| 59 | i915-y += \ |
| 60 | i915_memcpy.o \ |
| 61 | i915_mm.o \ |
| 62 | i915_sw_fence.o \ |
| 63 | i915_syncmap.o \ |
| 64 | i915_user_extensions.o |
Daniel Vetter | 9c065a7 | 2014-09-30 10:56:38 +0200 | [diff] [blame] | 65 | |
Daniel Vetter | 2fae6a8 | 2014-03-07 09:17:21 +0100 | [diff] [blame] | 66 | i915-$(CONFIG_COMPAT) += i915_ioc32.o |
Jani Nikula | df0566a | 2019-06-13 11:44:16 +0300 | [diff] [blame] | 67 | i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o display/intel_pipe_crc.o |
Tvrtko Ursulin | b46a33e | 2017-11-21 18:18:45 +0000 | [diff] [blame] | 68 | i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o |
Daniel Vetter | 2fae6a8 | 2014-03-07 09:17:21 +0100 | [diff] [blame] | 69 | |
Chris Wilson | 112ed2d | 2019-04-24 18:48:39 +0100 | [diff] [blame] | 70 | # "Graphics Technology" (aka we talk to the gpu) |
| 71 | obj-y += gt/ |
| 72 | gt-y += \ |
| 73 | gt/intel_breadcrumbs.o \ |
| 74 | gt/intel_context.o \ |
| 75 | gt/intel_engine_cs.o \ |
Chris Wilson | 79ffac85 | 2019-04-24 21:07:17 +0100 | [diff] [blame] | 76 | gt/intel_engine_pm.o \ |
Tvrtko Ursulin | 24635c5 | 2019-06-21 08:07:41 +0100 | [diff] [blame] | 77 | gt/intel_gt.o \ |
Chris Wilson | 79ffac85 | 2019-04-24 21:07:17 +0100 | [diff] [blame] | 78 | gt/intel_gt_pm.o \ |
Chris Wilson | 112ed2d | 2019-04-24 18:48:39 +0100 | [diff] [blame] | 79 | gt/intel_hangcheck.o \ |
| 80 | gt/intel_lrc.o \ |
Chris Wilson | 2006058 | 2019-07-04 10:19:25 +0100 | [diff] [blame] | 81 | gt/intel_renderstate.o \ |
Chris Wilson | 112ed2d | 2019-04-24 18:48:39 +0100 | [diff] [blame] | 82 | gt/intel_reset.o \ |
| 83 | gt/intel_ringbuffer.o \ |
| 84 | gt/intel_mocs.o \ |
| 85 | gt/intel_sseu.o \ |
Tvrtko Ursulin | f0c02c1 | 2019-06-21 08:08:10 +0100 | [diff] [blame] | 86 | gt/intel_timeline.o \ |
Chris Wilson | 112ed2d | 2019-04-24 18:48:39 +0100 | [diff] [blame] | 87 | gt/intel_workarounds.o |
Chris Wilson | 2006058 | 2019-07-04 10:19:25 +0100 | [diff] [blame] | 88 | # autogenerated null render state |
| 89 | gt-y += \ |
| 90 | gt/gen6_renderstate.o \ |
| 91 | gt/gen7_renderstate.o \ |
| 92 | gt/gen8_renderstate.o \ |
| 93 | gt/gen9_renderstate.o |
Chris Wilson | 112ed2d | 2019-04-24 18:48:39 +0100 | [diff] [blame] | 94 | gt-$(CONFIG_DRM_I915_SELFTEST) += \ |
| 95 | gt/mock_engine.o |
| 96 | i915-y += $(gt-y) |
| 97 | |
| 98 | # GEM (Graphics Execution Management) code |
Chris Wilson | 5e5d2e2 | 2019-05-28 10:29:42 +0100 | [diff] [blame] | 99 | obj-y += gem/ |
Chris Wilson | 9893214 | 2019-05-28 10:29:44 +0100 | [diff] [blame] | 100 | gem-y += \ |
Chris Wilson | 3f43c87 | 2019-05-28 10:29:53 +0100 | [diff] [blame] | 101 | gem/i915_gem_busy.o \ |
Chris Wilson | 10be98a | 2019-05-28 10:29:49 +0100 | [diff] [blame] | 102 | gem/i915_gem_clflush.o \ |
Matthew Auld | 6501aa4 | 2019-05-29 13:31:08 +0100 | [diff] [blame] | 103 | gem/i915_gem_client_blt.o \ |
Chris Wilson | 10be98a | 2019-05-28 10:29:49 +0100 | [diff] [blame] | 104 | gem/i915_gem_context.o \ |
| 105 | gem/i915_gem_dmabuf.o \ |
Chris Wilson | f0e4a06 | 2019-05-28 10:29:48 +0100 | [diff] [blame] | 106 | gem/i915_gem_domain.o \ |
Chris Wilson | 10be98a | 2019-05-28 10:29:49 +0100 | [diff] [blame] | 107 | gem/i915_gem_execbuffer.o \ |
Chris Wilson | 6951e58 | 2019-05-28 10:29:51 +0100 | [diff] [blame] | 108 | gem/i915_gem_fence.o \ |
Chris Wilson | 10be98a | 2019-05-28 10:29:49 +0100 | [diff] [blame] | 109 | gem/i915_gem_internal.o \ |
Chris Wilson | 8475355 | 2019-05-28 10:29:45 +0100 | [diff] [blame] | 110 | gem/i915_gem_object.o \ |
Matthew Auld | 6501aa4 | 2019-05-29 13:31:08 +0100 | [diff] [blame] | 111 | gem/i915_gem_object_blt.o \ |
Chris Wilson | b414fcd | 2019-05-28 10:29:47 +0100 | [diff] [blame] | 112 | gem/i915_gem_mman.o \ |
Chris Wilson | f033428 | 2019-05-28 10:29:46 +0100 | [diff] [blame] | 113 | gem/i915_gem_pages.o \ |
| 114 | gem/i915_gem_phys.o \ |
Chris Wilson | 10be98a | 2019-05-28 10:29:49 +0100 | [diff] [blame] | 115 | gem/i915_gem_pm.o \ |
| 116 | gem/i915_gem_shmem.o \ |
| 117 | gem/i915_gem_shrinker.o \ |
| 118 | gem/i915_gem_stolen.o \ |
Chris Wilson | 446e2d1 | 2019-05-28 10:29:54 +0100 | [diff] [blame] | 119 | gem/i915_gem_throttle.o \ |
Chris Wilson | 10be98a | 2019-05-28 10:29:49 +0100 | [diff] [blame] | 120 | gem/i915_gem_tiling.o \ |
| 121 | gem/i915_gem_userptr.o \ |
Chris Wilson | d45a1a5 | 2019-05-28 10:29:52 +0100 | [diff] [blame] | 122 | gem/i915_gem_wait.o \ |
Chris Wilson | 10be98a | 2019-05-28 10:29:49 +0100 | [diff] [blame] | 123 | gem/i915_gemfs.o |
Chris Wilson | 64d6c50 | 2019-02-05 13:00:02 +0000 | [diff] [blame] | 124 | i915-y += \ |
Chris Wilson | 9893214 | 2019-05-28 10:29:44 +0100 | [diff] [blame] | 125 | $(gem-y) \ |
Chris Wilson | 64d6c50 | 2019-02-05 13:00:02 +0000 | [diff] [blame] | 126 | i915_active.o \ |
| 127 | i915_cmd_parser.o \ |
Brad Volkin | 493018d | 2014-12-11 12:13:08 -0800 | [diff] [blame] | 128 | i915_gem_batch_pool.o \ |
Chris Wilson | b47eb4a | 2010-08-07 11:01:23 +0100 | [diff] [blame] | 129 | i915_gem_evict.o \ |
Joonas Lahtinen | b42fe9c | 2016-11-11 12:43:54 +0200 | [diff] [blame] | 130 | i915_gem_fence_reg.o \ |
Chris Wilson | 54cf91d | 2010-11-25 18:00:26 +0000 | [diff] [blame] | 131 | i915_gem_gtt.o \ |
Daniel Vetter | 2fae6a8 | 2014-03-07 09:17:21 +0100 | [diff] [blame] | 132 | i915_gem.o \ |
Chris Wilson | 32eb6bc | 2019-02-28 10:20:33 +0000 | [diff] [blame] | 133 | i915_globals.o \ |
Lionel Landwerlin | a446ae2 | 2018-03-06 12:28:56 +0000 | [diff] [blame] | 134 | i915_query.o \ |
Chris Wilson | e61e0f5 | 2018-02-21 09:56:36 +0000 | [diff] [blame] | 135 | i915_request.o \ |
Chris Wilson | e2f3496 | 2018-10-01 15:47:54 +0100 | [diff] [blame] | 136 | i915_scheduler.o \ |
Chris Wilson | 1c5d22f | 2009-08-25 11:15:50 +0100 | [diff] [blame] | 137 | i915_trace_points.o \ |
Joonas Lahtinen | b42fe9c | 2016-11-11 12:43:54 +0200 | [diff] [blame] | 138 | i915_vma.o \ |
Jackie Li | 6b0478f | 2018-03-13 17:32:50 -0700 | [diff] [blame] | 139 | intel_wopcm.o |
Daniel Vetter | 2fae6a8 | 2014-03-07 09:17:21 +0100 | [diff] [blame] | 140 | |
Alex Dai | 33a732f | 2015-08-12 15:43:36 +0100 | [diff] [blame] | 141 | # general-purpose microcontroller (GuC) support |
Daniele Ceraolo Spurio | 0f261b2 | 2019-07-13 11:00:11 +0100 | [diff] [blame] | 142 | obj-y += gt/uc/ |
| 143 | i915-y += gt/uc/intel_uc.o \ |
| 144 | gt/uc/intel_uc_fw.o \ |
| 145 | gt/uc/intel_guc.o \ |
| 146 | gt/uc/intel_guc_ads.o \ |
| 147 | gt/uc/intel_guc_ct.o \ |
| 148 | gt/uc/intel_guc_fw.o \ |
| 149 | gt/uc/intel_guc_log.o \ |
| 150 | gt/uc/intel_guc_submission.o \ |
| 151 | gt/uc/intel_huc.o \ |
| 152 | gt/uc/intel_huc_fw.o |
Alex Dai | 33a732f | 2015-08-12 15:43:36 +0100 | [diff] [blame] | 153 | |
Daniel Vetter | 2fae6a8 | 2014-03-07 09:17:21 +0100 | [diff] [blame] | 154 | # modesetting core code |
Jani Nikula | df0566a | 2019-06-13 11:44:16 +0300 | [diff] [blame] | 155 | obj-y += display/ |
| 156 | i915-y += \ |
| 157 | display/intel_atomic.o \ |
| 158 | display/intel_atomic_plane.o \ |
| 159 | display/intel_audio.o \ |
| 160 | display/intel_bios.o \ |
| 161 | display/intel_bw.o \ |
| 162 | display/intel_cdclk.o \ |
| 163 | display/intel_color.o \ |
| 164 | display/intel_combo_phy.o \ |
| 165 | display/intel_connector.o \ |
| 166 | display/intel_display.o \ |
| 167 | display/intel_display_power.o \ |
| 168 | display/intel_dpio_phy.o \ |
| 169 | display/intel_dpll_mgr.o \ |
| 170 | display/intel_fbc.o \ |
| 171 | display/intel_fifo_underrun.o \ |
| 172 | display/intel_frontbuffer.o \ |
| 173 | display/intel_hdcp.o \ |
| 174 | display/intel_hotplug.o \ |
| 175 | display/intel_lpe_audio.o \ |
| 176 | display/intel_overlay.o \ |
| 177 | display/intel_psr.o \ |
| 178 | display/intel_quirks.o \ |
Imre Deak | bc85328 | 2019-06-28 17:36:15 +0300 | [diff] [blame] | 179 | display/intel_sprite.o \ |
| 180 | display/intel_tc.o |
Jani Nikula | df0566a | 2019-06-13 11:44:16 +0300 | [diff] [blame] | 181 | i915-$(CONFIG_ACPI) += \ |
| 182 | display/intel_acpi.o \ |
| 183 | display/intel_opregion.o |
| 184 | i915-$(CONFIG_DRM_FBDEV_EMULATION) += \ |
| 185 | display/intel_fbdev.o |
Daniel Vetter | 2fae6a8 | 2014-03-07 09:17:21 +0100 | [diff] [blame] | 186 | |
| 187 | # modesetting output/encoder code |
Jani Nikula | 379bc10 | 2019-06-13 11:44:15 +0300 | [diff] [blame] | 188 | i915-y += \ |
| 189 | display/dvo_ch7017.o \ |
| 190 | display/dvo_ch7xxx.o \ |
| 191 | display/dvo_ivch.o \ |
| 192 | display/dvo_ns2501.o \ |
| 193 | display/dvo_sil164.o \ |
| 194 | display/dvo_tfp410.o \ |
| 195 | display/icl_dsi.o \ |
| 196 | display/intel_crt.o \ |
| 197 | display/intel_ddi.o \ |
| 198 | display/intel_dp.o \ |
| 199 | display/intel_dp_aux_backlight.o \ |
| 200 | display/intel_dp_link_training.o \ |
| 201 | display/intel_dp_mst.o \ |
| 202 | display/intel_dsi.o \ |
| 203 | display/intel_dsi_dcs_backlight.o \ |
| 204 | display/intel_dsi_vbt.o \ |
| 205 | display/intel_dvo.o \ |
| 206 | display/intel_gmbus.o \ |
| 207 | display/intel_hdmi.o \ |
| 208 | display/intel_lspcon.o \ |
| 209 | display/intel_lvds.o \ |
| 210 | display/intel_panel.o \ |
| 211 | display/intel_sdvo.o \ |
| 212 | display/intel_tv.o \ |
| 213 | display/intel_vdsc.o \ |
| 214 | display/vlv_dsi.o \ |
| 215 | display/vlv_dsi_pll.o |
Dave Airlie | c0e0920 | 2008-05-29 10:09:59 +1000 | [diff] [blame] | 216 | |
Michal Wajdeczko | 5ed7a0c | 2019-06-26 12:38:26 +0000 | [diff] [blame] | 217 | # perf code |
| 218 | obj-y += oa/ |
| 219 | i915-y += \ |
| 220 | oa/i915_oa_hsw.o \ |
| 221 | oa/i915_oa_bdw.o \ |
| 222 | oa/i915_oa_chv.o \ |
| 223 | oa/i915_oa_sklgt2.o \ |
| 224 | oa/i915_oa_sklgt3.o \ |
| 225 | oa/i915_oa_sklgt4.o \ |
| 226 | oa/i915_oa_bxt.o \ |
| 227 | oa/i915_oa_kblgt2.o \ |
| 228 | oa/i915_oa_kblgt3.o \ |
| 229 | oa/i915_oa_glk.o \ |
| 230 | oa/i915_oa_cflgt2.o \ |
| 231 | oa/i915_oa_cflgt3.o \ |
| 232 | oa/i915_oa_cnl.o \ |
| 233 | oa/i915_oa_icl.o |
| 234 | i915-y += i915_perf.o |
| 235 | |
Chris Wilson | 98a2f41 | 2016-10-12 10:05:18 +0100 | [diff] [blame] | 236 | # Post-mortem debug and GPU hang state capture |
| 237 | i915-$(CONFIG_DRM_I915_CAPTURE_ERROR) += i915_gpu_error.o |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 238 | i915-$(CONFIG_DRM_I915_SELFTEST) += \ |
Chris Wilson | 10be98a | 2019-05-28 10:29:49 +0100 | [diff] [blame] | 239 | gem/selftests/igt_gem_utils.o \ |
Chris Wilson | 953c7f8 | 2017-02-13 17:15:12 +0000 | [diff] [blame] | 240 | selftests/i915_random.o \ |
Chris Wilson | 98dc045 | 2018-05-05 10:10:13 +0100 | [diff] [blame] | 241 | selftests/i915_selftest.o \ |
Tvrtko Ursulin | 8d2f6e2 | 2018-11-30 08:02:53 +0000 | [diff] [blame] | 242 | selftests/igt_flush_test.o \ |
Chris Wilson | e4a8c81 | 2019-01-21 22:20:47 +0000 | [diff] [blame] | 243 | selftests/igt_live_test.o \ |
Tvrtko Ursulin | 28d6ccc | 2018-12-03 12:50:11 +0000 | [diff] [blame] | 244 | selftests/igt_reset.o \ |
Tvrtko Ursulin | 8d2f6e2 | 2018-11-30 08:02:53 +0000 | [diff] [blame] | 245 | selftests/igt_spinner.o |
Chris Wilson | 98a2f41 | 2016-10-12 10:05:18 +0100 | [diff] [blame] | 246 | |
Yu Zhang | cf9d289 | 2015-02-10 19:05:47 +0800 | [diff] [blame] | 247 | # virtual gpu code |
| 248 | i915-y += i915_vgpu.o |
| 249 | |
Zhi Wang | 0ad35fe | 2016-06-16 08:07:00 -0400 | [diff] [blame] | 250 | ifeq ($(CONFIG_DRM_I915_GVT),y) |
| 251 | i915-y += intel_gvt.o |
| 252 | include $(src)/gvt/Makefile |
| 253 | endif |
| 254 | |
Chris Wilson | c58305a | 2016-08-19 16:54:28 +0100 | [diff] [blame] | 255 | obj-$(CONFIG_DRM_I915) += i915.o |
Zhenyu Wang | 9bdb073 | 2018-12-07 16:16:53 +0800 | [diff] [blame] | 256 | obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o |