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