drivers/gpu/drm/Makefile

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/Makefile

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/Makefile
Extension
[no extension]
Size
7687 bytes
Lines
259
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: build/configuration rule
Status
atlas-only

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0

# Makefile for the drm device driver.  This driver provides support for the
# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.

CFLAGS-$(CONFIG_DRM_USE_DYNAMIC_DEBUG)	+= -DDYNAMIC_DEBUG_MODULE

# Unconditionally enable W=1 warnings locally
# --- begin copy-paste W=1 warnings from scripts/Makefile.warn
subdir-ccflags-y += -Wextra -Wunused -Wno-unused-parameter
subdir-ccflags-y += $(call cc-option, -Wrestrict)
subdir-ccflags-y += -Wmissing-format-attribute
subdir-ccflags-y += -Wold-style-definition
subdir-ccflags-y += -Wmissing-include-dirs
subdir-ccflags-y += $(call cc-option, -Wunused-but-set-variable)
subdir-ccflags-y += $(call cc-option, -Wunused-const-variable)
subdir-ccflags-y += $(call cc-option, -Wpacked-not-aligned)
subdir-ccflags-y += $(call cc-option, -Wformat-overflow)
# FIXME: fix -Wformat-truncation warnings and uncomment
#subdir-ccflags-y += $(call cc-option, -Wformat-truncation)
subdir-ccflags-y += $(call cc-option, -Wstringop-truncation)
# The following turn off the warnings enabled by -Wextra
ifeq ($(findstring 2, $(KBUILD_EXTRA_WARN)),)
subdir-ccflags-y += -Wno-missing-field-initializers
subdir-ccflags-y += -Wno-shift-negative-value
endif
ifeq ($(findstring 3, $(KBUILD_EXTRA_WARN)),)
subdir-ccflags-y += -Wno-sign-compare
endif
# --- end copy-paste

# Enable -Werror in CI and development
subdir-ccflags-$(CONFIG_DRM_WERROR) += -Werror

drm-y := \
	drm_atomic.o \
	drm_atomic_uapi.o \
	drm_auth.o \
	drm_blend.o \
	drm_bridge.o \
	drm_cache.o \
	drm_color_mgmt.o \
	drm_colorop.o \
	drm_connector.o \
	drm_crtc.o \
	drm_displayid.o \
	drm_drv.o \
	drm_dumb_buffers.o \
	drm_edid.o \
	drm_eld.o \
	drm_encoder.o \
	drm_file.o \
	drm_fourcc.o \
	drm_framebuffer.o \
	drm_gem.o \
	drm_ioctl.o \
	drm_lease.o \
	drm_managed.o \
	drm_mm.o \
	drm_mode_config.o \
	drm_mode_object.o \
	drm_modes.o \
	drm_modeset_lock.o \
	drm_plane.o \
	drm_prime.o \
	drm_print.o \
	drm_property.o \
	drm_rect.o \
	drm_syncobj.o \
	drm_sysfs.o \

Annotation

Implementation Notes