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_DRAW) += drm_draw.o 95drm-$(CONFIG_DRM_PANIC_SCREEN_QR_CODE) += drm_panic_qr.o 96obj-$(CONFIG_DRM) += drm.o 97 98obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o 99obj-$(CONFIG_DRM_PANEL_BACKLIGHT_QUIRKS) += drm_panel_backlight_quirks.o 100 101# 102# Memory-management helpers 103# 104# 105obj-$(CONFIG_DRM_EXEC) += drm_exec.o 106obj-$(CONFIG_DRM_GPUVM) += drm_gpuvm.o 107 108obj-$(CONFIG_DRM_BUDDY) += drm_buddy.o 109 110drm_dma_helper-y := drm_gem_dma_helper.o 111drm_dma_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_dma.o 112drm_dma_helper-$(CONFIG_DRM_KMS_HELPER) += drm_fb_dma_helper.o 113obj-$(CONFIG_DRM_GEM_DMA_HELPER) += drm_dma_helper.o 114 115drm_shmem_helper-y := drm_gem_shmem_helper.o 116drm_shmem_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_shmem.o 117obj-$(CONFIG_DRM_GEM_SHMEM_HELPER) += drm_shmem_helper.o 118 119drm_suballoc_helper-y := drm_suballoc.o 120obj-$(CONFIG_DRM_SUBALLOC_HELPER) += drm_suballoc_helper.o 121 122drm_vram_helper-y := drm_gem_vram_helper.o 123obj-$(CONFIG_DRM_VRAM_HELPER) += drm_vram_helper.o 124 125drm_ttm_helper-y := drm_gem_ttm_helper.o 126drm_ttm_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fbdev_ttm.o 127obj-$(CONFIG_DRM_TTM_HELPER) += drm_ttm_helper.o 128 129# 130# Modesetting helpers 131# 132 133drm_kms_helper-y := \ 134 drm_atomic_helper.o \ 135 drm_atomic_state_helper.o \ 136 drm_crtc_helper.o \ 137 drm_damage_helper.o \ 138 drm_encoder_slave.o \ 139 drm_flip_work.o \ 140 drm_format_helper.o \ 141 drm_gem_atomic_helper.o \ 142 drm_gem_framebuffer_helper.o \ 143 drm_kms_helper_common.o \ 144 drm_modeset_helper.o \ 145 drm_plane_helper.o \ 146 drm_probe_helper.o \ 147 drm_self_refresh_helper.o \ 148 drm_simple_kms_helper.o 149drm_kms_helper-$(CONFIG_DRM_PANEL_BRIDGE) += bridge/panel.o 150drm_kms_helper-$(CONFIG_DRM_FBDEV_EMULATION) += drm_fb_helper.o 151obj-$(CONFIG_DRM_KMS_HELPER) += drm_kms_helper.o 152 153# 154# Drivers and the rest 155# 156 157obj-y += tests/ 158 159obj-$(CONFIG_DRM_MIPI_DBI) += drm_mipi_dbi.o 160obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o 161obj-y += arm/ 162obj-y += clients/ 163obj-y += display/ 164obj-$(CONFIG_DRM_TTM) += ttm/ 165obj-$(CONFIG_DRM_SCHED) += scheduler/ 166obj-$(CONFIG_DRM_RADEON)+= radeon/ 167obj-$(CONFIG_DRM_AMDGPU)+= amd/amdgpu/ 168obj-$(CONFIG_DRM_AMDGPU)+= amd/amdxcp/ 169obj-$(CONFIG_DRM_I915) += i915/ 170obj-$(CONFIG_DRM_XE) += xe/ 171obj-$(CONFIG_DRM_KMB_DISPLAY) += kmb/ 172obj-$(CONFIG_DRM_MGAG200) += mgag200/ 173obj-$(CONFIG_DRM_V3D) += v3d/ 174obj-$(CONFIG_DRM_VC4) += vc4/ 175obj-$(CONFIG_DRM_VMWGFX)+= vmwgfx/ 176obj-$(CONFIG_DRM_VGEM) += vgem/ 177obj-$(CONFIG_DRM_VKMS) += vkms/ 178obj-$(CONFIG_DRM_NOUVEAU) +=nouveau/ 179obj-$(CONFIG_DRM_EXYNOS) +=exynos/ 180obj-$(CONFIG_DRM_ROCKCHIP) +=rockchip/ 181obj-$(CONFIG_DRM_GMA500) += gma500/ 182obj-$(CONFIG_DRM_UDL) += udl/ 183obj-$(CONFIG_DRM_AST) += ast/ 184obj-$(CONFIG_DRM_ARMADA) += armada/ 185obj-$(CONFIG_DRM_ATMEL_HLCDC) += atmel-hlcdc/ 186obj-y += renesas/ 187obj-y += omapdrm/ 188obj-$(CONFIG_DRM_SUN4I) += sun4i/ 189obj-y += tilcdc/ 190obj-$(CONFIG_DRM_QXL) += qxl/ 191obj-$(CONFIG_DRM_VIRTIO_GPU) += virtio/ 192obj-$(CONFIG_DRM_MSM) += msm/ 193obj-$(CONFIG_DRM_TEGRA) += tegra/ 194obj-$(CONFIG_DRM_STM) += stm/ 195obj-$(CONFIG_DRM_STI) += sti/ 196obj-y += imx/ 197obj-$(CONFIG_DRM_INGENIC) += ingenic/ 198obj-$(CONFIG_DRM_LOGICVC) += logicvc/ 199obj-$(CONFIG_DRM_MEDIATEK) += mediatek/ 200obj-$(CONFIG_DRM_MESON) += meson/ 201obj-y += i2c/ 202obj-y += panel/ 203obj-y += bridge/ 204obj-$(CONFIG_DRM_FSL_DCU) += fsl-dcu/ 205obj-$(CONFIG_DRM_ETNAVIV) += etnaviv/ 206obj-y += hisilicon/ 207obj-y += mxsfb/ 208obj-y += tiny/ 209obj-$(CONFIG_DRM_PL111) += pl111/ 210obj-$(CONFIG_DRM_TVE200) += tve200/ 211obj-$(CONFIG_DRM_XEN) += xen/ 212obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/ 213obj-$(CONFIG_DRM_LIMA) += lima/ 214obj-$(CONFIG_DRM_PANFROST) += panfrost/ 215obj-$(CONFIG_DRM_PANTHOR) += panthor/ 216obj-$(CONFIG_DRM_ASPEED_GFX) += aspeed/ 217obj-$(CONFIG_DRM_MCDE) += mcde/ 218obj-$(CONFIG_DRM_TIDSS) += tidss/ 219obj-y += xlnx/ 220obj-y += gud/ 221obj-$(CONFIG_DRM_HYPERV) += hyperv/ 222obj-y += solomon/ 223obj-$(CONFIG_DRM_SPRD) += sprd/ 224obj-$(CONFIG_DRM_LOONGSON) += loongson/ 225obj-$(CONFIG_DRM_POWERVR) += imagination/ 226