xref: /linux/drivers/gpu/drm/xe/Makefile (revision 1a545ed74b33eaf6dee6d4159be07819ad89a569)
1dd08ebf6SMatthew Brost# SPDX-License-Identifier: GPL-2.0
2dd08ebf6SMatthew Brost#
3dd08ebf6SMatthew Brost# Makefile for the drm device driver.  This driver provides support for the
4dd08ebf6SMatthew Brost# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
5dd08ebf6SMatthew Brost
6dd08ebf6SMatthew Brost# Add a set of useful warning flags and enable -Werror for CI to prevent
7dd08ebf6SMatthew Brost# trivial mistakes from creeping in. We have to do this piecemeal as we reject
8dd08ebf6SMatthew Brost# any patch that isn't warning clean, so turning on -Wall -Wextra (or W=1) we
9dd08ebf6SMatthew Brost# need to filter out dubious warnings.  Still it is our interest
10dd08ebf6SMatthew Brost# to keep running locally with W=1 C=1 until we are completely clean.
11dd08ebf6SMatthew Brost#
12dd08ebf6SMatthew Brost# Note the danger in using -Wall -Wextra is that when CI updates gcc we
13dd08ebf6SMatthew Brost# will most likely get a sudden build breakage... Hopefully we will fix
14dd08ebf6SMatthew Brost# new warnings before CI updates!
15dd08ebf6SMatthew Brostsubdir-ccflags-y := -Wall -Wextra
165a4a8e8bSLucas De Marchisubdir-ccflags-y += $(call cc-disable-warning, unused-parameter)
175a4a8e8bSLucas De Marchisubdir-ccflags-y += $(call cc-disable-warning, type-limits)
18dd08ebf6SMatthew Brostsubdir-ccflags-y += $(call cc-disable-warning, missing-field-initializers)
19dd08ebf6SMatthew Brostsubdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable)
20dd08ebf6SMatthew Brost# clang warnings
21dd08ebf6SMatthew Brostsubdir-ccflags-y += $(call cc-disable-warning, sign-compare)
22dd08ebf6SMatthew Brostsubdir-ccflags-y += $(call cc-disable-warning, sometimes-uninitialized)
23dd08ebf6SMatthew Brostsubdir-ccflags-y += $(call cc-disable-warning, initializer-overrides)
24dd08ebf6SMatthew Brostsubdir-ccflags-y += $(call cc-disable-warning, frame-address)
25dd08ebf6SMatthew Brostsubdir-ccflags-$(CONFIG_DRM_XE_WERROR) += -Werror
26dd08ebf6SMatthew Brost
27dd08ebf6SMatthew Brost# Fine grained warnings disable
28dd08ebf6SMatthew BrostCFLAGS_xe_pci.o = $(call cc-disable-warning, override-init)
29dd08ebf6SMatthew Brost
30dd08ebf6SMatthew Brostsubdir-ccflags-y += -I$(srctree)/$(src)
31dd08ebf6SMatthew Brost
32dd08ebf6SMatthew Brost# Please keep these build lists sorted!
33dd08ebf6SMatthew Brost
34dd08ebf6SMatthew Brost# core driver code
35dd08ebf6SMatthew Brost
36dd08ebf6SMatthew Brostxe-y += xe_bb.o \
37dd08ebf6SMatthew Brost	xe_bo.o \
38dd08ebf6SMatthew Brost	xe_bo_evict.o \
39dd08ebf6SMatthew Brost	xe_debugfs.o \
40dd08ebf6SMatthew Brost	xe_device.o \
41dd08ebf6SMatthew Brost	xe_dma_buf.o \
42dd08ebf6SMatthew Brost	xe_engine.o \
43dd08ebf6SMatthew Brost	xe_exec.o \
44dd08ebf6SMatthew Brost	xe_execlist.o \
45dd08ebf6SMatthew Brost	xe_force_wake.o \
46dd08ebf6SMatthew Brost	xe_ggtt.o \
47dd08ebf6SMatthew Brost	xe_gpu_scheduler.o \
48dd08ebf6SMatthew Brost	xe_gt.o \
49dd08ebf6SMatthew Brost	xe_gt_clock.o \
50dd08ebf6SMatthew Brost	xe_gt_debugfs.o \
51dd08ebf6SMatthew Brost	xe_gt_mcr.o \
52dd08ebf6SMatthew Brost	xe_gt_pagefault.o \
53dd08ebf6SMatthew Brost	xe_gt_sysfs.o \
54a9351846SMatthew Brost	xe_gt_tlb_invalidation.o \
55dd08ebf6SMatthew Brost	xe_gt_topology.o \
56dd08ebf6SMatthew Brost	xe_guc.o \
57dd08ebf6SMatthew Brost	xe_guc_ads.o \
58dd08ebf6SMatthew Brost	xe_guc_ct.o \
59dd08ebf6SMatthew Brost	xe_guc_debugfs.o \
60dd08ebf6SMatthew Brost	xe_guc_hwconfig.o \
61dd08ebf6SMatthew Brost	xe_guc_log.o \
62dd08ebf6SMatthew Brost	xe_guc_pc.o \
63dd08ebf6SMatthew Brost	xe_guc_submit.o \
64dd08ebf6SMatthew Brost	xe_hw_engine.o \
65dd08ebf6SMatthew Brost	xe_hw_fence.o \
66dd08ebf6SMatthew Brost	xe_huc.o \
67dd08ebf6SMatthew Brost	xe_huc_debugfs.o \
68dd08ebf6SMatthew Brost	xe_irq.o \
69dd08ebf6SMatthew Brost	xe_lrc.o \
70dd08ebf6SMatthew Brost	xe_migrate.o \
71dd08ebf6SMatthew Brost	xe_mmio.o \
72dd08ebf6SMatthew Brost	xe_mocs.o \
73dd08ebf6SMatthew Brost	xe_module.o \
74576c6380SMatt Roper	xe_pat.o \
75dd08ebf6SMatthew Brost	xe_pci.o \
76dd08ebf6SMatthew Brost	xe_pcode.o \
77dd08ebf6SMatthew Brost	xe_pm.o \
78dd08ebf6SMatthew Brost	xe_preempt_fence.o \
79dd08ebf6SMatthew Brost	xe_pt.o \
80dd08ebf6SMatthew Brost	xe_pt_walk.o \
81dd08ebf6SMatthew Brost	xe_query.o \
82dd08ebf6SMatthew Brost	xe_reg_sr.o \
83dd08ebf6SMatthew Brost	xe_reg_whitelist.o \
84dd08ebf6SMatthew Brost	xe_rtp.o \
85dd08ebf6SMatthew Brost	xe_ring_ops.o \
86dd08ebf6SMatthew Brost	xe_sa.o \
87dd08ebf6SMatthew Brost	xe_sched_job.o \
88dd08ebf6SMatthew Brost	xe_step.o \
89dd08ebf6SMatthew Brost	xe_sync.o \
90dd08ebf6SMatthew Brost	xe_trace.o \
91*1a545ed7SChang, Bruce	xe_ttm_sys_mgr.o \
92d8b52a02SMaarten Lankhorst	xe_ttm_stolen_mgr.o \
93dd08ebf6SMatthew Brost	xe_ttm_vram_mgr.o \
94dd08ebf6SMatthew Brost	xe_tuning.o \
95dd08ebf6SMatthew Brost	xe_uc.o \
96dd08ebf6SMatthew Brost	xe_uc_debugfs.o \
97dd08ebf6SMatthew Brost	xe_uc_fw.o \
98dd08ebf6SMatthew Brost	xe_vm.o \
99dd08ebf6SMatthew Brost	xe_vm_madvise.o \
100dd08ebf6SMatthew Brost	xe_wait_user_fence.o \
101dd08ebf6SMatthew Brost	xe_wa.o \
102dd08ebf6SMatthew Brost	xe_wopcm.o
103dd08ebf6SMatthew Brost
104dd08ebf6SMatthew Brostobj-$(CONFIG_DRM_XE) += xe.o
105dd08ebf6SMatthew Brostobj-$(CONFIG_DRM_XE_KUNIT_TEST) += tests/
106dd08ebf6SMatthew Brost\
107dd08ebf6SMatthew Brost# header test
108dd08ebf6SMatthew Brostalways-$(CONFIG_DRM_XE_WERROR) += \
109dd08ebf6SMatthew Brost	$(patsubst %.h,%.hdrtest, $(shell cd $(srctree)/$(src) && find * -name '*.h'))
110dd08ebf6SMatthew Brost
111dd08ebf6SMatthew Brostquiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@)
112dd08ebf6SMatthew Brost      cmd_hdrtest = $(CC) -DHDRTEST $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; touch $@
113dd08ebf6SMatthew Brost
114dd08ebf6SMatthew Brost$(obj)/%.hdrtest: $(src)/%.h FORCE
115dd08ebf6SMatthew Brost	$(call if_changed_dep,hdrtest)
116