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