OSDN Git Service

drm/amd/display: Make BREAK_TO_DEBUGGER() a debug print
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Fri, 22 May 2020 18:03:26 +0000 (14:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 May 2020 18:00:50 +0000 (14:00 -0400)
commit1aad7078191116f8a363466fcf461f2325c5def2
treef349f6f26b62d0d0d9958ef731b87d8f3a9e0e38
parent4541ea81edde6ce9a1d9be082489aca7e8e7e1dc
drm/amd/display: Make BREAK_TO_DEBUGGER() a debug print

[Why]
Warnings in the kernel are generally treated as errors.

The BREAK_TO_DEBUGGER macro is not a critical error or warning, but
rather intended for developer use to help investigate behavior and
sequences for other issues.

We do still make use of DC_ERROR/ASSERT(0) in various places in the
code for things that are genuine issues.

Since most developers don't actually KGDB while debugging the kernel
these essentially would have no value on their own since the KGDB
breakpoint wouldn't trigger - ASSERT(0) was used as a shortcut to get
a stacktrace.

[How]
Turn it into a DRM_DEBUG_DRIVER print instead. We unfortunately lose
the stacktrace, but we still do retain some of the useful debug
information this offers by having at least the function and line
number loggable.

If KGDB is supported in the kernel this will still trigger a real
breakpoint as well.

Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/os_types.h