Files
linux/drivers/gpu/drm/tests/Makefile
Nicolas Frattaroli 2693c9572e drm/tests: Move test EDID data to separate .c file
Having the test EDID arrays defined in the .h directly will duplicate
them across every user of the EDID arrays. This works fine as long as
there's only one user, but may produce build warnings/errors when there
are multiple users and not all of them use all definitions.

Move the array definitions to a new .c file, and mark the declarations
in the header as "extern" to avoid the linker throwing a fit, and give
them an explicit size (either 128 or 256, depending on EDID) to avoid
the compiler inferring that they must be size 1.

Reported-by: Jani Nikula <jani.nikula@linux.intel.com>
Closes: https://lore.kernel.org/r/04ff70850213ae0f75486b1a27a7edb6fb4e71c3@intel.com/
Fixes: ce1d0139ad ("drm/tests: bridge: Add test for HDMI output bus formats helper")
Fixes: 082fbc179c ("drm/tests: bridge: Add KUnit tests for bridge chain format selection")
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patch.msgid.link/20260610-test-edid-array-definition-fix-v3-1-8ba947c1c453@collabora.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
2026-06-15 12:49:13 +03:00

31 lines
714 B
Makefile

# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_DRM_KUNIT_TEST_HELPERS) += \
drm_kunit_helpers.o
obj-$(CONFIG_DRM_KUNIT_TEST) += \
drm_atomic_test.o \
drm_atomic_commit_test.o \
drm_bridge_test.o \
drm_cmdline_parser_test.o \
drm_connector_test.o \
drm_damage_helper_test.o \
drm_dp_mst_helper_test.o \
drm_exec_test.o \
drm_format_helper_test.o \
drm_format_test.o \
drm_framebuffer_test.o \
drm_gem_shmem_test.o \
drm_hdmi_state_helper_test.o \
drm_managed_test.o \
drm_mm_test.o \
drm_modes_test.o \
drm_plane_helper_test.o \
drm_probe_helper_test.o \
drm_rect_test.o \
drm_sysfb_modeset_test.o \
drm_fixp_test.o \
drm_kunit_edid.o
CFLAGS_drm_mm_test.o := $(DISABLE_STRUCTLEAK_PLUGIN)