Skip to content

RFC drm: use dynamic_debug

Jim Cromie dri-devel intel-gfx lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm: RFC add choice to use dynamic debug in drm-debugdrivers/gpu/drm/Kconfig drivers/gpu/drm/drm_print.c include/drm/drm_print.h+153 -274 replies
2/2i915: POC use dynamic_debug_exec_queries to control pr_debugs in gvtdrivers/gpu/drm/i915/gvt/Makefile drivers/gpu/drm/i915/i915_params.c+75 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] drm: use dynamic_debug

hello gentle readers,

These 2 rfc patches convert part of drm-world to use dynamic debug.

1st one addresses drm.debug category based logging. If DYNAMIC_DEBUG is configured, then CONFIG_DRM_USE_DYNAMIC_DEBUG controls whether dynamic-debug is used to avoid runtime costs of drm_debug_enabled(). We require CONFIG_JUMP_LABEL too, since we are selling its optimization.

This change adds many new callsites to /proc/dynamic_debug/control; ~300 in drm, ~200 in drm_kms_helper, as well as ~1500 in i915 driver, and ~3200 in amdgpu. So there are substantial implications here.

2nd one is for i915, which I have in my laptop. grep pr_debug found ~90 callsites with a meaningful format-prefix-string, to demonstrate use of "format ^prefix" to control user categorized debugs.

Jim Cromie (2):
drm: RFC add choice to use dynamic debug in drm-debug
i915: POC use dynamic_debug_exec_queries to control pr_debugs in gvt

 drivers/gpu/drm/Kconfig            | 13 +++++
 drivers/gpu/drm/drm_print.c        | 75 ++++++++++++++++++++++--
 drivers/gpu/drm/i915/gvt/Makefile  |  1 +
 drivers/gpu/drm/i915/i915_params.c | 74 ++++++++++++++++++++++++
 include/drm/drm_print.h            | 92 ++++++++++++++++++++++--------
 5 files changed, 228 insertions(+), 27 deletions(-)
Signature · 1 line
2.28.0