summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/os_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/os_types.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/os_types.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/os_types.h b/drivers/gpu/drm/amd/display/dc/os_types.h
index 6d7bca562eec..c3bbfe397e8d 100644
--- a/drivers/gpu/drm/amd/display/dc/os_types.h
+++ b/drivers/gpu/drm/amd/display/dc/os_types.h
@@ -111,7 +111,15 @@
#define ASSERT(expr) WARN_ON_ONCE(!(expr))
#endif
-#define BREAK_TO_DEBUGGER() ASSERT(0)
+#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__); \
+ kgdb_breakpoint(); \
+ } while (0)
+#else
+#define BREAK_TO_DEBUGGER() DRM_DEBUG_DRIVER("%s():%d\n", __func__, __LINE__)
+#endif
#define DC_ERR(...) do { \
dm_error(__VA_ARGS__); \