1 # SPDX-License-Identifier: GPL-2.0
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.
6 CFLAGS-
$(CONFIG_DRM_USE_DYNAMIC_DEBUG
) += -DDYNAMIC_DEBUG_MODULE
8 # Unconditionally enable W=1 warnings locally
9 # --- begin copy-paste W=1 warnings from scripts/Makefile.extrawarn
10 subdir-ccflags-y
+= -Wextra
-Wunused
-Wno-unused-parameter
11 subdir-ccflags-y
+= $(call cc-option
, -Wrestrict
)
12 subdir-ccflags-y
+= -Wmissing-format-attribute
13 subdir-ccflags-y
+= -Wold-style-definition
14 subdir-ccflags-y
+= -Wmissing-include-dirs
15 subdir-ccflags-y
+= $(call cc-option
, -Wunused-but-set-variable
)
16 subdir-ccflags-y
+= $(call cc-option
, -Wunused-const-variable
)
17 subdir-ccflags-y
+= $(call cc-option
, -Wpacked-not-aligned
)
18 subdir-ccflags-y
+= $(call cc-option
, -Wformat-overflow
)
19 # FIXME: fix -Wformat-truncation warnings and uncomment
20 #subdir-ccflags-y += $(call cc-option, -Wformat-truncation)
21 subdir-ccflags-y
+= $(call cc-option
, -Wstringop-truncation
)
22 # The following turn off the warnings enabled by -Wextra
23 ifeq ($(findstring 2, $(KBUILD_EXTRA_WARN
)),)
24 subdir-ccflags-y
+= -Wno-missing-field-initializers
25 subdir-ccflags-y
+= -Wno-type-limits
26 subdir-ccflags-y
+= -Wno-shift-negative-value
28 ifeq ($(findstring 3, $(KBUILD_EXTRA_WARN
)),)
29 subdir-ccflags-y
+= -Wno-sign-compare
33 # Enable -Werror in CI and development
34 subdir-ccflags-
$(CONFIG_DRM_WERROR
) += -Werror
76 drm-
$(CONFIG_DRM_CLIENT
) += \
80 drm-
$(CONFIG_DRM_LIB_RANDOM
) += lib
/drm_random.o
81 drm-
$(CONFIG_COMPAT
) += drm_ioc32.o
82 drm-
$(CONFIG_DRM_PANEL
) += drm_panel.o
83 drm-
$(CONFIG_OF
) += drm_of.o
84 drm-
$(CONFIG_PCI
) += drm_pci.o
85 drm-
$(CONFIG_DEBUG_FS
) += \
88 drm-
$(CONFIG_DRM_LOAD_EDID_FIRMWARE
) += drm_edid_load.o
89 drm-
$(CONFIG_DRM_PRIVACY_SCREEN
) += \
90 drm_privacy_screen.o \
91 drm_privacy_screen_x86.o
92 drm-
$(CONFIG_DRM_ACCEL
) += ..
/..
/accel
/drm_accel.o
93 drm-
$(CONFIG_DRM_PANIC
) += drm_panic.o
94 drm-
$(CONFIG_DRM_PANIC_SCREEN_QR_CODE
) += drm_panic_qr.o
95 obj-
$(CONFIG_DRM
) += drm.o
97 obj-
$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS
) += drm_panel_orientation_quirks.o
100 # Memory-management helpers
103 obj-
$(CONFIG_DRM_EXEC
) += drm_exec.o
104 obj-
$(CONFIG_DRM_GPUVM
) += drm_gpuvm.o
106 obj-
$(CONFIG_DRM_BUDDY
) += drm_buddy.o
108 drm_dma_helper-y
:= drm_gem_dma_helper.o
109 drm_dma_helper-
$(CONFIG_DRM_FBDEV_EMULATION
) += drm_fbdev_dma.o
110 drm_dma_helper-
$(CONFIG_DRM_KMS_HELPER
) += drm_fb_dma_helper.o
111 obj-
$(CONFIG_DRM_GEM_DMA_HELPER
) += drm_dma_helper.o
113 drm_shmem_helper-y
:= drm_gem_shmem_helper.o
114 drm_shmem_helper-
$(CONFIG_DRM_FBDEV_EMULATION
) += drm_fbdev_shmem.o
115 obj-
$(CONFIG_DRM_GEM_SHMEM_HELPER
) += drm_shmem_helper.o
117 drm_suballoc_helper-y
:= drm_suballoc.o
118 obj-
$(CONFIG_DRM_SUBALLOC_HELPER
) += drm_suballoc_helper.o
120 drm_vram_helper-y
:= drm_gem_vram_helper.o
121 obj-
$(CONFIG_DRM_VRAM_HELPER
) += drm_vram_helper.o
123 drm_ttm_helper-y
:= drm_gem_ttm_helper.o
124 drm_ttm_helper-
$(CONFIG_DRM_FBDEV_EMULATION
) += drm_fbdev_ttm.o
125 obj-
$(CONFIG_DRM_TTM_HELPER
) += drm_ttm_helper.o
128 # Modesetting helpers
131 drm_kms_helper-y
:= \
132 drm_atomic_helper.o \
133 drm_atomic_state_helper.o \
135 drm_damage_helper.o \
136 drm_encoder_slave.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 \
145 drm_self_refresh_helper.o \
146 drm_simple_kms_helper.o
147 drm_kms_helper-
$(CONFIG_DRM_PANEL_BRIDGE
) += bridge
/panel.o
148 drm_kms_helper-
$(CONFIG_DRM_FBDEV_EMULATION
) += drm_fb_helper.o
149 obj-
$(CONFIG_DRM_KMS_HELPER
) += drm_kms_helper.o
155 drm_client_lib-y
:= drm_client_setup.o
156 drm_client_lib-
$(CONFIG_DRM_FBDEV_EMULATION
) += drm_fbdev_client.o
157 obj-
$(CONFIG_DRM_CLIENT_LIB
) += drm_client_lib.o
160 # Drivers and the rest
165 obj-
$(CONFIG_DRM_MIPI_DBI
) += drm_mipi_dbi.o
166 obj-
$(CONFIG_DRM_MIPI_DSI
) += drm_mipi_dsi.o
169 obj-
$(CONFIG_DRM_TTM
) += ttm
/
170 obj-
$(CONFIG_DRM_SCHED
) += scheduler
/
171 obj-
$(CONFIG_DRM_RADEON
)+= radeon
/
172 obj-
$(CONFIG_DRM_AMDGPU
)+= amd
/amdgpu
/
173 obj-
$(CONFIG_DRM_AMDGPU
)+= amd
/amdxcp
/
174 obj-
$(CONFIG_DRM_I915
) += i915
/
175 obj-
$(CONFIG_DRM_XE
) += xe
/
176 obj-
$(CONFIG_DRM_KMB_DISPLAY
) += kmb
/
177 obj-
$(CONFIG_DRM_MGAG200
) += mgag200
/
178 obj-
$(CONFIG_DRM_V3D
) += v3d
/
179 obj-
$(CONFIG_DRM_VC4
) += vc4
/
180 obj-
$(CONFIG_DRM_VMWGFX
)+= vmwgfx
/
181 obj-
$(CONFIG_DRM_VGEM
) += vgem
/
182 obj-
$(CONFIG_DRM_VKMS
) += vkms
/
183 obj-
$(CONFIG_DRM_NOUVEAU
) +=nouveau
/
184 obj-
$(CONFIG_DRM_EXYNOS
) +=exynos
/
185 obj-
$(CONFIG_DRM_ROCKCHIP
) +=rockchip
/
186 obj-
$(CONFIG_DRM_GMA500
) += gma500
/
187 obj-
$(CONFIG_DRM_UDL
) += udl
/
188 obj-
$(CONFIG_DRM_AST
) += ast
/
189 obj-
$(CONFIG_DRM_ARMADA
) += armada
/
190 obj-
$(CONFIG_DRM_ATMEL_HLCDC
) += atmel-hlcdc
/
193 obj-
$(CONFIG_DRM_SUN4I
) += sun4i
/
195 obj-
$(CONFIG_DRM_QXL
) += qxl
/
196 obj-
$(CONFIG_DRM_VIRTIO_GPU
) += virtio
/
197 obj-
$(CONFIG_DRM_MSM
) += msm
/
198 obj-
$(CONFIG_DRM_TEGRA
) += tegra
/
199 obj-
$(CONFIG_DRM_STM
) += stm
/
200 obj-
$(CONFIG_DRM_STI
) += sti
/
202 obj-
$(CONFIG_DRM_INGENIC
) += ingenic
/
203 obj-
$(CONFIG_DRM_LOGICVC
) += logicvc
/
204 obj-
$(CONFIG_DRM_MEDIATEK
) += mediatek
/
205 obj-
$(CONFIG_DRM_MESON
) += meson
/
209 obj-
$(CONFIG_DRM_FSL_DCU
) += fsl-dcu
/
210 obj-
$(CONFIG_DRM_ETNAVIV
) += etnaviv
/
214 obj-
$(CONFIG_DRM_PL111
) += pl111
/
215 obj-
$(CONFIG_DRM_TVE200
) += tve200
/
216 obj-
$(CONFIG_DRM_XEN
) += xen
/
217 obj-
$(CONFIG_DRM_VBOXVIDEO
) += vboxvideo
/
218 obj-
$(CONFIG_DRM_LIMA
) += lima
/
219 obj-
$(CONFIG_DRM_PANFROST
) += panfrost
/
220 obj-
$(CONFIG_DRM_PANTHOR
) += panthor
/
221 obj-
$(CONFIG_DRM_ASPEED_GFX
) += aspeed
/
222 obj-
$(CONFIG_DRM_MCDE
) += mcde
/
223 obj-
$(CONFIG_DRM_TIDSS
) += tidss
/
226 obj-
$(CONFIG_DRM_HYPERV
) += hyperv
/
228 obj-
$(CONFIG_DRM_SPRD
) += sprd
/
229 obj-
$(CONFIG_DRM_LOONGSON
) += loongson
/
230 obj-
$(CONFIG_DRM_POWERVR
) += imagination
/