xref: /linux/drivers/gpu/drm/Makefile (revision da5b2ad1c2f18834cb1ce429e2e5a5cf5cbdf21b)
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_aperture.o \
38	drm_atomic.o \
39	drm_atomic_uapi.o \
40	drm_auth.o \
41	drm_blend.o \
42	drm_bridge.o \
43	drm_cache.o \
44	drm_client.o \
45	drm_client_modeset.o \
46	drm_color_mgmt.o \
47	drm_connector.o \
48	drm_crtc.o \
49	drm_displayid.o \
50	drm_drv.o \
51	drm_dumb_buffers.o \
52	drm_edid.o \
53	drm_eld.o \
54	drm_encoder.o \
55	drm_file.o \
56	drm_fourcc.o \
57	drm_framebuffer.o \
58	drm_gem.o \
59	drm_ioctl.o \
60	drm_lease.o \
61	drm_managed.o \
62	drm_mm.o \
63	drm_mode_config.o \
64	drm_mode_object.o \
65	drm_modes.o \
66	drm_modeset_lock.o \
67	drm_plane.o \
68	drm_prime.o \
69	drm_print.o \
70	drm_property.o \
71	drm_syncobj.o \
72	drm_sysfs.o \
73	drm_trace_points.o \
74	drm_vblank.o \
75	drm_vblank_work.o \
76	drm_vma_manager.o \
77	drm_writeback.o
78drm-$(CONFIG_DRM_LIB_RANDOM) += lib/drm_random.o
79drm-$(CONFIG_COMPAT) += drm_ioc32.o
80drm-$(CONFIG_DRM_PANEL) += drm_panel.o
81drm-$(CONFIG_OF) += drm_of.o
82drm-$(CONFIG_PCI) += drm_pci.o
83drm-$(CONFIG_DEBUG_FS) += \
84	drm_debugfs.o \
85	drm_debugfs_crc.o
86drm-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
87drm-$(CONFIG_DRM_PRIVACY_SCREEN) += \
88	drm_privacy_screen.o \
89	drm_privacy_screen_x86.o
90drm-$(CONFIG_DRM_ACCEL) += ../../accel/drm_accel.o
91drm-$(CONFIG_DRM_PANIC) += drm_panic.o
92obj-$(CONFIG_DRM)	+= drm.o
93
94obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o
95
96#
97# Memory-management helpers
98#
99#
100obj-$(CONFIG_DRM_EXEC) += drm_exec.o
101obj-$(CONFIG_DRM_GPUVM) += drm_gpuvm.o
102
103obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o
104
105drm_dma_helper-y := drm_gem_dma_helper.o
106drm_dma_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_dma.o
107drm_dma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_dma_helper.o
108obj-$(CONFIG_DRM_GEM_DMA_HELPER) += drm_dma_helper.o
109
110drm_shmem_helper-y := drm_gem_shmem_helper.o
111drm_shmem_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_shmem.o
112obj-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_shmem_helper.o
113
114drm_suballoc_helper-y := drm_suballoc.o
115obj-$(CONFIG_DRM_SUBALLOC_HELPER) += drm_suballoc_helper.o
116
117drm_vram_helper-y := drm_gem_vram_helper.o
118obj-$(CONFIG_DRM_VRAM_HELPER) += drm_vram_helper.o
119
120drm_ttm_helper-y := drm_gem_ttm_helper.o
121drm_ttm_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_ttm.o
122obj-$(CONFIG_DRM_TTM_HELPER) += drm_ttm_helper.o
123
124#
125# Modesetting helpers
126#
127
128drm_kms_helper-y := \
129	drm_atomic_helper.o \
130	drm_atomic_state_helper.o \
131	drm_crtc_helper.o \
132	drm_damage_helper.o \
133	drm_encoder_slave.o \
134	drm_flip_work.o \
135	drm_format_helper.o \
136	drm_gem_atomic_helper.o \
137	drm_gem_framebuffer_helper.o \
138	drm_kms_helper_common.o \
139	drm_modeset_helper.o \
140	drm_plane_helper.o \
141	drm_probe_helper.o \
142	drm_rect.o \
143	drm_self_refresh_helper.o \
144	drm_simple_kms_helper.o
145drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o
146drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fb_helper.o
147obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
148
149#
150# Drivers and the rest
151#
152
153obj-y			+= tests/
154
155obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o
156obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
157obj-y			+= arm/
158obj-y			+= display/
159obj-$(CONFIG_DRM_TTM)	+= ttm/
160obj-$(CONFIG_DRM_SCHED)	+= scheduler/
161obj-$(CONFIG_DRM_RADEON)+= radeon/
162obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
163obj-$(CONFIG_DRM_AMDGPU)+= amd/amdxcp/
164obj-$(CONFIG_DRM_I915)	+= i915/
165obj-$(CONFIG_DRM_XE)	+= xe/
166obj-$(CONFIG_DRM_KMB_DISPLAY)  += kmb/
167obj-$(CONFIG_DRM_MGAG200) += mgag200/
168obj-$(CONFIG_DRM_V3D)  += v3d/
169obj-$(CONFIG_DRM_VC4)  += vc4/
170obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
171obj-$(CONFIG_DRM_VGEM)	+= vgem/
172obj-$(CONFIG_DRM_VKMS)	+= vkms/
173obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/
174obj-$(CONFIG_DRM_EXYNOS) +=exynos/
175obj-$(CONFIG_DRM_ROCKCHIP) +=rockchip/
176obj-$(CONFIG_DRM_GMA500) += gma500/
177obj-$(CONFIG_DRM_UDL) += udl/
178obj-$(CONFIG_DRM_AST) += ast/
179obj-$(CONFIG_DRM_ARMADA) += armada/
180obj-$(CONFIG_DRM_ATMEL_HLCDC)	+= atmel-hlcdc/
181obj-y			+= renesas/
182obj-y			+= omapdrm/
183obj-$(CONFIG_DRM_SUN4I) += sun4i/
184obj-y			+= tilcdc/
185obj-$(CONFIG_DRM_QXL) += qxl/
186obj-$(CONFIG_DRM_VIRTIO_GPU) += virtio/
187obj-$(CONFIG_DRM_MSM) += msm/
188obj-$(CONFIG_DRM_TEGRA) += tegra/
189obj-$(CONFIG_DRM_STM) += stm/
190obj-$(CONFIG_DRM_STI) += sti/
191obj-y 			+= imx/
192obj-$(CONFIG_DRM_INGENIC) += ingenic/
193obj-$(CONFIG_DRM_LOGICVC) += logicvc/
194obj-$(CONFIG_DRM_MEDIATEK) += mediatek/
195obj-$(CONFIG_DRM_MESON)	+= meson/
196obj-y			+= i2c/
197obj-y			+= panel/
198obj-y			+= bridge/
199obj-$(CONFIG_DRM_FSL_DCU) += fsl-dcu/
200obj-$(CONFIG_DRM_ETNAVIV) += etnaviv/
201obj-y			+= hisilicon/
202obj-y			+= mxsfb/
203obj-y			+= tiny/
204obj-$(CONFIG_DRM_PL111) += pl111/
205obj-$(CONFIG_DRM_TVE200) += tve200/
206obj-$(CONFIG_DRM_XEN) += xen/
207obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
208obj-$(CONFIG_DRM_LIMA)  += lima/
209obj-$(CONFIG_DRM_PANFROST) += panfrost/
210obj-$(CONFIG_DRM_PANTHOR) += panthor/
211obj-$(CONFIG_DRM_ASPEED_GFX) += aspeed/
212obj-$(CONFIG_DRM_MCDE) += mcde/
213obj-$(CONFIG_DRM_TIDSS) += tidss/
214obj-y			+= xlnx/
215obj-y			+= gud/
216obj-$(CONFIG_DRM_HYPERV) += hyperv/
217obj-y			+= solomon/
218obj-$(CONFIG_DRM_SPRD) += sprd/
219obj-$(CONFIG_DRM_LOONGSON) += loongson/
220obj-$(CONFIG_DRM_POWERVR) += imagination/
221