xref: /linux/drivers/gpu/drm/Makefile (revision e77a8005748547fb1f10645097f13ccdd804d7e5)
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
6CFLAGS-$(CONFIG_DRM_USE_DYNAMIC_DEBUG)	+= -DDYNAMIC_DEBUG_MODULE
7
8# Unconditionally enable W=1 warnings locally
9# --- begin copy-paste W=1 warnings from scripts/Makefile.extrawarn
10subdir-ccflags-y += -Wextra -Wunused -Wno-unused-parameter
11subdir-ccflags-y += $(call cc-option, -Wrestrict)
12subdir-ccflags-y += -Wmissing-format-attribute
13subdir-ccflags-y += -Wold-style-definition
14subdir-ccflags-y += -Wmissing-include-dirs
15subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable)
16subdir-ccflags-y += $(call cc-option, -Wunused-const-variable)
17subdir-ccflags-y += $(call cc-option, -Wpacked-not-aligned)
18subdir-ccflags-y += $(call cc-option, -Wformat-overflow)
19# FIXME: fix -Wformat-truncation warnings and uncomment
20#subdir-ccflags-y += $(call cc-option, -Wformat-truncation)
21subdir-ccflags-y += $(call cc-option, -Wstringop-truncation)
22# The following turn off the warnings enabled by -Wextra
23ifeq ($(findstring 2, $(KBUILD_EXTRA_WARN)),)
24subdir-ccflags-y += -Wno-missing-field-initializers
25subdir-ccflags-y += -Wno-type-limits
26subdir-ccflags-y += -Wno-shift-negative-value
27endif
28ifeq ($(findstring 3, $(KBUILD_EXTRA_WARN)),)
29subdir-ccflags-y += -Wno-sign-compare
30endif
31# --- end copy-paste
32
33# Enable -Werror in CI and development
34subdir-ccflags-$(CONFIG_DRM_WERROR) += -Werror
35
36drm-y := \
37	drm_atomic.o \
38	drm_atomic_uapi.o \
39	drm_auth.o \
40	drm_blend.o \
41	drm_bridge.o \
42	drm_cache.o \
43	drm_color_mgmt.o \
44	drm_connector.o \
45	drm_crtc.o \
46	drm_displayid.o \
47	drm_drv.o \
48	drm_dumb_buffers.o \
49	drm_edid.o \
50	drm_eld.o \
51	drm_encoder.o \
52	drm_file.o \
53	drm_fourcc.o \
54	drm_framebuffer.o \
55	drm_gem.o \
56	drm_ioctl.o \
57	drm_lease.o \
58	drm_managed.o \
59	drm_mm.o \
60	drm_mode_config.o \
61	drm_mode_object.o \
62	drm_modes.o \
63	drm_modeset_lock.o \
64	drm_plane.o \
65	drm_prime.o \
66	drm_print.o \
67	drm_property.o \
68	drm_rect.o \
69	drm_syncobj.o \
70	drm_sysfs.o \
71	drm_trace_points.o \
72	drm_vblank.o \
73	drm_vblank_work.o \
74	drm_vma_manager.o \
75	drm_writeback.o
76drm-$(CONFIG_DRM_CLIENT) += \
77	drm_client.o \
78	drm_client_event.o \
79	drm_client_modeset.o
80drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
81drm-$(CONFIG_COMPAT) += drm_ioc32.o
82drm-$(CONFIG_DRM_PANEL) += drm_panel.o
83drm-$(CONFIG_OF) += drm_of.o
84drm-$(CONFIG_PCI) += drm_pci.o
85drm-$(CONFIG_DEBUG_FS) += \
86	drm_debugfs.o \
87	drm_debugfs_crc.o
88drm-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
89drm-$(CONFIG_DRM_PRIVACY_SCREEN) += \
90	drm_privacy_screen.o \
91	drm_privacy_screen_x86.o
92drm-$(CONFIG_DRM_ACCEL) += ../../accel/drm_accel.o
93drm-$(CONFIG_DRM_PANIC) += drm_panic.o
94drm-$(CONFIG_DRM_PANIC_SCREEN_QR_CODE) += drm_panic_qr.o
95obj-$(CONFIG_DRM)	+= drm.o
96
97obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o
98
99#
100# Memory-management helpers
101#
102#
103obj-$(CONFIG_DRM_EXEC) += drm_exec.o
104obj-$(CONFIG_DRM_GPUVM) += drm_gpuvm.o
105
106obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o
107
108drm_dma_helper-y := drm_gem_dma_helper.o
109drm_dma_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_dma.o
110drm_dma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_dma_helper.o
111obj-$(CONFIG_DRM_GEM_DMA_HELPER) += drm_dma_helper.o
112
113drm_shmem_helper-y := drm_gem_shmem_helper.o
114drm_shmem_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_shmem.o
115obj-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_shmem_helper.o
116
117drm_suballoc_helper-y := drm_suballoc.o
118obj-$(CONFIG_DRM_SUBALLOC_HELPER) += drm_suballoc_helper.o
119
120drm_vram_helper-y := drm_gem_vram_helper.o
121obj-$(CONFIG_DRM_VRAM_HELPER) += drm_vram_helper.o
122
123drm_ttm_helper-y := drm_gem_ttm_helper.o
124drm_ttm_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_ttm.o
125obj-$(CONFIG_DRM_TTM_HELPER) += drm_ttm_helper.o
126
127#
128# Modesetting helpers
129#
130
131drm_kms_helper-y := \
132	drm_atomic_helper.o \
133	drm_atomic_state_helper.o \
134	drm_crtc_helper.o \
135	drm_damage_helper.o \
136	drm_encoder_slave.o \
137	drm_flip_work.o \
138	drm_format_helper.o \
139	drm_gem_atomic_helper.o \
140	drm_gem_framebuffer_helper.o \
141	drm_kms_helper_common.o \
142	drm_modeset_helper.o \
143	drm_plane_helper.o \
144	drm_probe_helper.o \
145	drm_self_refresh_helper.o \
146	drm_simple_kms_helper.o
147drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o
148drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fb_helper.o
149obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
150
151#
152# DRM clients
153#
154
155drm_client_lib-y := drm_client_setup.o
156drm_client_lib-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_client.o
157obj-$(CONFIG_DRM_CLIENT_LIB) += drm_client_lib.o
158
159#
160# Drivers and the rest
161#
162
163obj-y			+= tests/
164
165obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o
166obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
167obj-y			+= arm/
168obj-y			+= display/
169obj-$(CONFIG_DRM_TTM)	+= ttm/
170obj-$(CONFIG_DRM_SCHED)	+= scheduler/
171obj-$(CONFIG_DRM_RADEON)+= radeon/
172obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
173obj-$(CONFIG_DRM_AMDGPU)+= amd/amdxcp/
174obj-$(CONFIG_DRM_I915)	+= i915/
175obj-$(CONFIG_DRM_XE)	+= xe/
176obj-$(CONFIG_DRM_KMB_DISPLAY)  += kmb/
177obj-$(CONFIG_DRM_MGAG200) += mgag200/
178obj-$(CONFIG_DRM_V3D)  += v3d/
179obj-$(CONFIG_DRM_VC4)  += vc4/
180obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
181obj-$(CONFIG_DRM_VGEM)	+= vgem/
182obj-$(CONFIG_DRM_VKMS)	+= vkms/
183obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/
184obj-$(CONFIG_DRM_EXYNOS) +=exynos/
185obj-$(CONFIG_DRM_ROCKCHIP) +=rockchip/
186obj-$(CONFIG_DRM_GMA500) += gma500/
187obj-$(CONFIG_DRM_UDL) += udl/
188obj-$(CONFIG_DRM_AST) += ast/
189obj-$(CONFIG_DRM_ARMADA) += armada/
190obj-$(CONFIG_DRM_ATMEL_HLCDC)	+= atmel-hlcdc/
191obj-y			+= renesas/
192obj-y			+= omapdrm/
193obj-$(CONFIG_DRM_SUN4I) += sun4i/
194obj-y			+= tilcdc/
195obj-$(CONFIG_DRM_QXL) += qxl/
196obj-$(CONFIG_DRM_VIRTIO_GPU) += virtio/
197obj-$(CONFIG_DRM_MSM) += msm/
198obj-$(CONFIG_DRM_TEGRA) += tegra/
199obj-$(CONFIG_DRM_STM) += stm/
200obj-$(CONFIG_DRM_STI) += sti/
201obj-y 			+= imx/
202obj-$(CONFIG_DRM_INGENIC) += ingenic/
203obj-$(CONFIG_DRM_LOGICVC) += logicvc/
204obj-$(CONFIG_DRM_MEDIATEK) += mediatek/
205obj-$(CONFIG_DRM_MESON)	+= meson/
206obj-y			+= i2c/
207obj-y			+= panel/
208obj-y			+= bridge/
209obj-$(CONFIG_DRM_FSL_DCU) += fsl-dcu/
210obj-$(CONFIG_DRM_ETNAVIV) += etnaviv/
211obj-y			+= hisilicon/
212obj-y			+= mxsfb/
213obj-y			+= tiny/
214obj-$(CONFIG_DRM_PL111) += pl111/
215obj-$(CONFIG_DRM_TVE200) += tve200/
216obj-$(CONFIG_DRM_XEN) += xen/
217obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
218obj-$(CONFIG_DRM_LIMA)  += lima/
219obj-$(CONFIG_DRM_PANFROST) += panfrost/
220obj-$(CONFIG_DRM_PANTHOR) += panthor/
221obj-$(CONFIG_DRM_ASPEED_GFX) += aspeed/
222obj-$(CONFIG_DRM_MCDE) += mcde/
223obj-$(CONFIG_DRM_TIDSS) += tidss/
224obj-y			+= xlnx/
225obj-y			+= gud/
226obj-$(CONFIG_DRM_HYPERV) += hyperv/
227obj-y			+= solomon/
228obj-$(CONFIG_DRM_SPRD) += sprd/
229obj-$(CONFIG_DRM_LOONGSON) += loongson/
230obj-$(CONFIG_DRM_POWERVR) += imagination/
231