From: sashiko-bot@kernel.org
To: "Jim Cromie" <jim.cromie@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 5/5] drm-dyndbg: drop BROKEN on DRM_USE_DYNAMIC_DEBUG for testing (DONT_APPLY)
Date: Fri, 20 Nov 2026 17:35:58 +0000 [thread overview]
Message-ID: <sashiko-outbox-225691@kernel.org> (raw)
In-Reply-To: <20261120-rd-mostly-v2-5-88056ede02a8@gmail.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [High] drm: build failure in drivers/accel/ with
CONFIG_DRM_USE_DYNAMIC_DEBUG=y
- [Medium] drm: broken debug logging in ddebug_change() and
ddebug_add_module()
- [Medium] drm/print: unconditional debug output in __drm_printfn_dbg()
--
commit e718019be2a4836ac3663a62da5e819f0a591c63
Author: Jim Cromie <jim.cromie@gmail.com>
drm-dyndbg: drop BROKEN on DRM_USE_DYNAMIC_DEBUG for testing (DONT_APPLY)
This commit removes the BROKEN dependency from CONFIG_DRM_USE_DYNAMIC_DEBUG
so the option can be enabled for testing.
> diff --git a/drivers/gpu/drm/Kconfig.debug b/drivers/gpu/drm/Kconfig.debug
> index b909cd0a619fe..b0aa56281413c 100644
> --- a/drivers/gpu/drm/Kconfig.debug
> +++ b/drivers/gpu/drm/Kconfig.debug
> @@ -1,7 +1,6 @@
> config DRM_USE_DYNAMIC_DEBUG
> bool "use dynamic debug to implement drm.debug"
> default n
> - depends on BROKEN
> depends on DRM
> depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE
> depends on JUMP_LABEL
[Severity: High]
Does enabling CONFIG_DRM_USE_DYNAMIC_DEBUG=y with
CONFIG_DYNAMIC_DEBUG_CORE=y and CONFIG_DYNAMIC_DEBUG=n break the build
for drivers under drivers/accel/ that call drm_dbg() (such as amdxdna,
ethosu, and rocket)?
When CONFIG_DRM_USE_DYNAMIC_DEBUG=y, include/drm/drm_print.h expands
drm_dev_dbg() and __drm_dbg() to _dynamic_func_call_cls(). In
include/linux/dynamic_debug.h, _dynamic_func_call_cls() is only defined
when CONFIG_DYNAMIC_DEBUG is set or when both CONFIG_DYNAMIC_DEBUG_CORE
and DYNAMIC_DEBUG_MODULE are defined, with no fallback stub in the #else
branch. Unlike drivers/gpu/drm/Makefile, drivers/accel/Makefile does not
add -DDYNAMIC_DEBUG_MODULE to ccflags-y or subdir-ccflags-y, leaving
_dynamic_func_call_cls undeclared.
[Severity: Medium]
Does enabling CONFIG_DRM_USE_DYNAMIC_DEBUG=y leave drm_dbg*() callsites
impossible to enable in most DRM modules, and suppress debug output during
module probe when drm.debug is set prior to loading a driver module?
With CONFIG_DRM_USE_DYNAMIC_DEBUG=y, drm_dev_dbg() and __drm_dbg() tag
descriptors with DRM_UT_* class IDs rather than _DPRINTK_CLASS_DFLT. In
ddebug_change(), class-tagged descriptors only match when the module has
a registered classmap in dt->maps, which currently only drm,
drm_kms_helper, drm_display_helper, amdgpu, i915, and nouveau declare via
DECLARE_DYNDBG_CLASSMAP. In addition, ddebug_add_module() ->
ddebug_attach_module_classes() attaches a newly loaded module's classmap
without applying the active __drm_debug bitmap to its callsites.
[Severity: Medium]
Does enabling CONFIG_DRM_USE_DYNAMIC_DEBUG=y cause __drm_printfn_dbg() to
emit KERN_DEBUG messages unconditionally even when drm.debug is 0?
include/drm/drm_print.h defines __drm_debug_enabled(category) as true
when CONFIG_DRM_USE_DYNAMIC_DEBUG=y, assuming callsites are gated by a
dynamic debug jump label. However, drm_dbg_printer() uses
__drm_printfn_dbg() directly without a jump label:
drivers/gpu/drm/drm_print.c:__drm_printfn_dbg() {
...
if (!__drm_debug_enabled(p->category))
return;
__drm_dev_vprintk(dev, KERN_DEBUG, p->origin, p->prefix, vaf);
}
As a result, any drm_printf() or drm_vprintf() call on a drm_dbg_printer()
without an external check (such as in intel_display_driver_register() or
ttm_bo_mem_space_debug()) always prints to the kernel log.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261120-rd-mostly-v2-0-88056ede02a8@gmail.com?part=5
prev parent reply other threads:[~2026-11-20 17:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 17:18 [PATCH v2 0/5] drm/print,dyndbg: __drm_debug __read_mostly, uint shrink, build fixes Jim Cromie
2026-11-20 17:18 ` Jim Cromie via B4 Relay
2026-11-20 17:18 ` [PATCH v2 1/5] drm/print: Mark __drm_debug as __read_mostly Jim Cromie
2026-11-20 17:18 ` Jim Cromie via B4 Relay
2026-11-20 17:18 ` [PATCH v2 2/5] drm: Fix incorrect CFLAGS-y spelling inside Makefile Jim Cromie
2026-11-20 17:18 ` Jim Cromie via B4 Relay
2026-11-20 17:32 ` sashiko-bot
2026-11-20 17:18 ` [PATCH v2 3/5] drm: fix config dependent unused variable warning Jim Cromie
2026-11-20 17:18 ` Jim Cromie via B4 Relay
2026-11-20 17:33 ` sashiko-bot
2026-11-20 17:18 ` [PATCH v2 4/5] drm/print,dyndbg: restore __drm_debug to uint from ulong Jim Cromie
2026-11-20 17:18 ` Jim Cromie via B4 Relay
2026-11-20 17:18 ` [PATCH v2 5/5] drm-dyndbg: drop BROKEN on DRM_USE_DYNAMIC_DEBUG for testing (DONT_APPLY) Jim Cromie
2026-11-20 17:18 ` Jim Cromie via B4 Relay
2026-11-20 17:35 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-225691@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jim.cromie@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.