Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: Move some options to separate new Kconfig

Move some options out into a new debug specific kconfig file in order to
make things a bit cleaner.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Philipp Stanner <phasta@kernel.org>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20250324092633.49746-2-tvrtko.ursulin@igalia.com

authored by

Tvrtko Ursulin and committed by
Philipp Stanner
8e623137 f878af62

+109 -105
+5 -105
drivers/gpu/drm/Kconfig
··· 26 26 details. You should also select and configure AGP 27 27 (/dev/agpgart) support if it is available for your platform. 28 28 29 + menu "DRM debugging options" 30 + depends on DRM 31 + source "drivers/gpu/drm/Kconfig.debug" 32 + endmenu 33 + 29 34 if DRM 30 35 31 36 config DRM_MIPI_DBI ··· 41 36 config DRM_MIPI_DSI 42 37 bool 43 38 depends on DRM 44 - 45 - config DRM_DEBUG_MM 46 - bool "Insert extra checks and debug info into the DRM range managers" 47 - default n 48 - depends on DRM 49 - depends on STACKTRACE_SUPPORT 50 - select STACKDEPOT 51 - help 52 - Enable allocation tracking of memory manager and leak detection on 53 - shutdown. 54 - 55 - Recommended for driver developers only. 56 - 57 - If in doubt, say "N". 58 - 59 - config DRM_USE_DYNAMIC_DEBUG 60 - bool "use dynamic debug to implement drm.debug" 61 - default n 62 - depends on BROKEN 63 - depends on DRM 64 - depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE 65 - depends on JUMP_LABEL 66 - help 67 - Use dynamic-debug to avoid drm_debug_enabled() runtime overheads. 68 - Due to callsite counts in DRM drivers (~4k in amdgpu) and 56 69 - bytes per callsite, the .data costs can be substantial, and 70 - are therefore configurable. 71 - 72 - config DRM_KUNIT_TEST_HELPERS 73 - tristate 74 - depends on DRM && KUNIT 75 - select DRM_KMS_HELPER 76 - help 77 - KUnit Helpers for KMS drivers. 78 - 79 - config DRM_KUNIT_TEST 80 - tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS 81 - depends on DRM && KUNIT && MMU 82 - select DRM_BRIDGE_CONNECTOR 83 - select DRM_BUDDY 84 - select DRM_DISPLAY_DP_HELPER 85 - select DRM_DISPLAY_HDMI_STATE_HELPER 86 - select DRM_DISPLAY_HELPER 87 - select DRM_EXEC 88 - select DRM_EXPORT_FOR_TESTS if m 89 - select DRM_GEM_SHMEM_HELPER 90 - select DRM_KUNIT_TEST_HELPERS 91 - select DRM_LIB_RANDOM 92 - select PRIME_NUMBERS 93 - default KUNIT_ALL_TESTS 94 - help 95 - This builds unit tests for DRM. This option is not useful for 96 - distributions or general kernels, but only for kernel 97 - developers working on DRM and associated drivers. 98 - 99 - For more information on KUnit and unit tests in general, 100 - please refer to the KUnit documentation in 101 - Documentation/dev-tools/kunit/. 102 - 103 - If in doubt, say "N". 104 39 105 40 config DRM_KMS_HELPER 106 41 tristate ··· 192 247 GPU memory management subsystem for devices with multiple 193 248 GPU memory types. Will be enabled automatically if a device driver 194 249 uses it. 195 - 196 - config DRM_TTM_KUNIT_TEST 197 - tristate "KUnit tests for TTM" if !KUNIT_ALL_TESTS 198 - default n 199 - depends on DRM && KUNIT && MMU && (UML || COMPILE_TEST) 200 - select DRM_TTM 201 - select DRM_BUDDY 202 - select DRM_EXPORT_FOR_TESTS if m 203 - select DRM_KUNIT_TEST_HELPERS 204 - default KUNIT_ALL_TESTS 205 - help 206 - Enables unit tests for TTM, a GPU memory manager subsystem used 207 - to manage memory buffers. This option is mostly useful for kernel 208 - developers. It depends on (UML || COMPILE_TEST) since no other driver 209 - which uses TTM can be loaded while running the tests. 210 - 211 - If in doubt, say "N". 212 250 213 251 config DRM_EXEC 214 252 tristate ··· 394 466 395 467 If M is selected the module will be called hyperv_drm. 396 468 397 - config DRM_EXPORT_FOR_TESTS 398 - bool 399 - 400 469 # Separate option as not all DRM drivers use it 401 470 config DRM_PANEL_BACKLIGHT_QUIRKS 402 471 tristate ··· 405 480 config DRM_PRIVACY_SCREEN 406 481 bool 407 482 default n 408 - 409 - config DRM_WERROR 410 - bool "Compile the drm subsystem with warnings as errors" 411 - depends on DRM && EXPERT 412 - depends on !WERROR 413 - default n 414 - help 415 - A kernel build should not cause any compiler warnings, and this 416 - enables the '-Werror' flag to enforce that rule in the drm subsystem. 417 - 418 - The drm subsystem enables more warnings than the kernel default, so 419 - this config option is disabled by default. 420 - 421 - If in doubt, say N. 422 - 423 - config DRM_HEADER_TEST 424 - bool "Ensure DRM headers are self-contained and pass kernel-doc" 425 - depends on DRM && EXPERT 426 - default n 427 - help 428 - Ensure the DRM subsystem headers both under drivers/gpu/drm and 429 - include/drm compile, are self-contained, have header guards, and have 430 - no kernel-doc warnings. 431 - 432 - If in doubt, say N. 433 483 434 484 endif 435 485
+104
drivers/gpu/drm/Kconfig.debug
··· 1 + config DRM_USE_DYNAMIC_DEBUG 2 + bool "use dynamic debug to implement drm.debug" 3 + default n 4 + depends on BROKEN 5 + depends on DRM 6 + depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE 7 + depends on JUMP_LABEL 8 + help 9 + Use dynamic-debug to avoid drm_debug_enabled() runtime overheads. 10 + Due to callsite counts in DRM drivers (~4k in amdgpu) and 56 11 + bytes per callsite, the .data costs can be substantial, and 12 + are therefore configurable. 13 + 14 + config DRM_WERROR 15 + bool "Compile the drm subsystem with warnings as errors" 16 + depends on DRM && EXPERT 17 + depends on !WERROR 18 + default n 19 + help 20 + A kernel build should not cause any compiler warnings, and this 21 + enables the '-Werror' flag to enforce that rule in the drm subsystem. 22 + 23 + The drm subsystem enables more warnings than the kernel default, so 24 + this config option is disabled by default. 25 + 26 + If in doubt, say N. 27 + 28 + config DRM_HEADER_TEST 29 + bool "Ensure DRM headers are self-contained and pass kernel-doc" 30 + depends on DRM && EXPERT 31 + default n 32 + help 33 + Ensure the DRM subsystem headers both under drivers/gpu/drm and 34 + include/drm compile, are self-contained, have header guards, and have 35 + no kernel-doc warnings. 36 + 37 + If in doubt, say N. 38 + 39 + config DRM_DEBUG_MM 40 + bool "Insert extra checks and debug info into the DRM range managers" 41 + default n 42 + depends on DRM 43 + depends on STACKTRACE_SUPPORT 44 + select STACKDEPOT 45 + help 46 + Enable allocation tracking of memory manager and leak detection on 47 + shutdown. 48 + 49 + Recommended for driver developers only. 50 + 51 + If in doubt, say "N". 52 + 53 + config DRM_KUNIT_TEST_HELPERS 54 + tristate 55 + depends on DRM && KUNIT 56 + select DRM_KMS_HELPER 57 + help 58 + KUnit Helpers for KMS drivers. 59 + 60 + config DRM_KUNIT_TEST 61 + tristate "KUnit tests for DRM" if !KUNIT_ALL_TESTS 62 + depends on DRM && KUNIT && MMU 63 + select DRM_BRIDGE_CONNECTOR 64 + select DRM_BUDDY 65 + select DRM_DISPLAY_DP_HELPER 66 + select DRM_DISPLAY_HDMI_STATE_HELPER 67 + select DRM_DISPLAY_HELPER 68 + select DRM_EXEC 69 + select DRM_EXPORT_FOR_TESTS if m 70 + select DRM_GEM_SHMEM_HELPER 71 + select DRM_KUNIT_TEST_HELPERS 72 + select DRM_LIB_RANDOM 73 + select PRIME_NUMBERS 74 + default KUNIT_ALL_TESTS 75 + help 76 + This builds unit tests for DRM. This option is not useful for 77 + distributions or general kernels, but only for kernel 78 + developers working on DRM and associated drivers. 79 + 80 + For more information on KUnit and unit tests in general, 81 + please refer to the KUnit documentation in 82 + Documentation/dev-tools/kunit/. 83 + 84 + If in doubt, say "N". 85 + 86 + config DRM_TTM_KUNIT_TEST 87 + tristate "KUnit tests for TTM" if !KUNIT_ALL_TESTS 88 + default n 89 + depends on DRM && KUNIT && MMU && (UML || COMPILE_TEST) 90 + select DRM_TTM 91 + select DRM_BUDDY 92 + select DRM_EXPORT_FOR_TESTS if m 93 + select DRM_KUNIT_TEST_HELPERS 94 + default KUNIT_ALL_TESTS 95 + help 96 + Enables unit tests for TTM, a GPU memory manager subsystem used 97 + to manage memory buffers. This option is mostly useful for kernel 98 + developers. It depends on (UML || COMPILE_TEST) since no other driver 99 + which uses TTM can be loaded while running the tests. 100 + 101 + If in doubt, say "N". 102 + 103 + config DRM_EXPORT_FOR_TESTS 104 + bool