xref: /linux/drivers/gpu/drm/Makefile (revision 2a6b6c9a226279b4f6668450ddb21ae655558087)
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_bridge_connector.o \
132	drm_crtc_helper.o \
133	drm_damage_helper.o \
134	drm_encoder_slave.o \
135	drm_flip_work.o \
136	drm_format_helper.o \
137	drm_gem_atomic_helper.o \
138	drm_gem_framebuffer_helper.o \
139	drm_kms_helper_common.o \
140	drm_modeset_helper.o \
141	drm_plane_helper.o \
142	drm_probe_helper.o \
143	drm_rect.o \
144	drm_self_refresh_helper.o \
145	drm_simple_kms_helper.o
146drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o
147drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fb_helper.o
148obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o
149
150#
151# Drivers and the rest
152#
153
154obj-y			+= tests/
155
156obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o
157obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
158obj-y			+= arm/
159obj-y			+= display/
160obj-$(CONFIG_DRM_TTM)	+= ttm/
161obj-$(CONFIG_DRM_SCHED)	+= scheduler/
162obj-$(CONFIG_DRM_RADEON)+= radeon/
163obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/
164obj-$(CONFIG_DRM_AMDGPU)+= amd/amdxcp/
165obj-$(CONFIG_DRM_I915)	+= i915/
166obj-$(CONFIG_DRM_XE)	+= xe/
167obj-$(CONFIG_DRM_KMB_DISPLAY)  += kmb/
168obj-$(CONFIG_DRM_MGAG200) += mgag200/
169obj-$(CONFIG_DRM_V3D)  += v3d/
170obj-$(CONFIG_DRM_VC4)  += vc4/
171obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/
172obj-$(CONFIG_DRM_VGEM)	+= vgem/
173obj-$(CONFIG_DRM_VKMS)	+= vkms/
174obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/
175obj-$(CONFIG_DRM_EXYNOS) +=exynos/
176obj-$(CONFIG_DRM_ROCKCHIP) +=rockchip/
177obj-$(CONFIG_DRM_GMA500) += gma500/
178obj-$(CONFIG_DRM_UDL) += udl/
179obj-$(CONFIG_DRM_AST) += ast/
180obj-$(CONFIG_DRM_ARMADA) += armada/
181obj-$(CONFIG_DRM_ATMEL_HLCDC)	+= atmel-hlcdc/
182obj-y			+= renesas/
183obj-y			+= omapdrm/
184obj-$(CONFIG_DRM_SUN4I) += sun4i/
185obj-y			+= tilcdc/
186obj-$(CONFIG_DRM_QXL) += qxl/
187obj-$(CONFIG_DRM_VIRTIO_GPU) += virtio/
188obj-$(CONFIG_DRM_MSM) += msm/
189obj-$(CONFIG_DRM_TEGRA) += tegra/
190obj-$(CONFIG_DRM_STM) += stm/
191obj-$(CONFIG_DRM_STI) += sti/
192obj-y 			+= imx/
193obj-$(CONFIG_DRM_INGENIC) += ingenic/
194obj-$(CONFIG_DRM_LOGICVC) += logicvc/
195obj-$(CONFIG_DRM_MEDIATEK) += mediatek/
196obj-$(CONFIG_DRM_MESON)	+= meson/
197obj-y			+= i2c/
198obj-y			+= panel/
199obj-y			+= bridge/
200obj-$(CONFIG_DRM_FSL_DCU) += fsl-dcu/
201obj-$(CONFIG_DRM_ETNAVIV) += etnaviv/
202obj-y			+= hisilicon/
203obj-y			+= mxsfb/
204obj-y			+= tiny/
205obj-$(CONFIG_DRM_PL111) += pl111/
206obj-$(CONFIG_DRM_TVE200) += tve200/
207obj-$(CONFIG_DRM_XEN) += xen/
208obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
209obj-$(CONFIG_DRM_LIMA)  += lima/
210obj-$(CONFIG_DRM_PANFROST) += panfrost/
211obj-$(CONFIG_DRM_PANTHOR) += panthor/
212obj-$(CONFIG_DRM_ASPEED_GFX) += aspeed/
213obj-$(CONFIG_DRM_MCDE) += mcde/
214obj-$(CONFIG_DRM_TIDSS) += tidss/
215obj-y			+= xlnx/
216obj-y			+= gud/
217obj-$(CONFIG_DRM_HYPERV) += hyperv/
218obj-y			+= solomon/
219obj-$(CONFIG_DRM_SPRD) += sprd/
220obj-$(CONFIG_DRM_LOONGSON) += loongson/
221obj-$(CONFIG_DRM_POWERVR) += imagination/
222