Skip to contentSkip to conversation

drm/amd/display: Only actually breakpoint if DEBUG_KERNEL_DC is enabled

PATCH In review Nicholas Kazlauskas 2 participants 2 messages Jun 3, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/display: Only actually breakpoint if DEBUG_KERNEL_DC is enabled

To match previous behavior and to not hang the kernel if someone accidentally builds with KGDB enabled.

Fixes 4324a1752045 ("drm/amd/display: Make BREAK_TO_DEBUGGER() a debug print")
Cc Harry Wentland <[email protected]>
Cc Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/os_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/os_types.h +1 -1
index 604ceb6c0375..c3bbfe397e8d 100644
@@ -111,7 +111,7 @@
 #define ASSERT(expr) WARN_ON_ONCE(!(expr))
 #endif
 
-#if defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB)
+#if defined(CONFIG_DEBUG_KERNEL_DC) && (defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB))
 #define BREAK_TO_DEBUGGER() \
 	do { \
 		DRM_DEBUG_DRIVER("%s():%d\n", __func__, __LINE__); \
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Nicholas Kazlauskas

To match previous behavior and to not hang the kernel if someone accidentally builds with KGDB enabled.

Fixes 4324a1752045 ("drm/amd/display: Make BREAK_TO_DEBUGGER() a debug print")
Cc Harry Wentland <[email protected]>
Cc Alex Deucher <[email protected]>

Harry

Quoted 10 lines
---
 drivers/gpu/drm/amd/display/dc/os_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/os_types.h +0 -0
index 604ceb6c0375..c3bbfe397e8d 100644

drivers/gpu/drm/amd/display/dc/os_types.h line 117

Quoted 8 lines
drivers/gpu/drm/amd/display/dc/os_types.h +1 -1
@@ -111,7 +111,7 @@
 #define ASSERT(expr) WARN_ON_ONCE(!(expr))
 #endif
 
-#if defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB)
+#if defined(CONFIG_DEBUG_KERNEL_DC) && (defined(CONFIG_HAVE_KGDB) || defined(CONFIG_KGDB))
 #define BREAK_TO_DEBUGGER() \
 	do { \
 		DRM_DEBUG_DRIVER("%s():%d\n", __func__, __LINE__); \

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx