DRM - avoid regression in -rc, fix comment
Subsystems (2)
cover DRM - avoid regression in -rc, fix comment
hi DRM-folks,
DRM_USE_DYNAMIC_DEBUG has regression, mark as BROKEN for now. Also correct a comment.
Jim Cromie (2):
drm: mark CONFIG_DRM_USE_DYNAMIC_DEBUG as BROKEN for now
drm_print: fix stale macro-name in comment
drivers/gpu/drm/Kconfig | 3 ++- include/drm/drm_print.h | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-)
Signature · 1 line
2.38.1
PATCH 1/2 drm: mark CONFIG_DRM_USE_DYNAMIC_DEBUG as BROKEN for now
CONFIG_DRM_USE_DYNAMIC_DEBUG=y has a regression, due to a chicken-egg initialization problem:
1- modprobe i915
i915 needs drm.ko, which is loaded 1st
2- "modprobe drm drm.debug=0x1ff" (virtual/implied)
drm.debug is set post-initialization, from boot-args etc
3- modprobe i915 finishes
W/O drm.debug-on-dyndbg that just works, because drm_dbg* does drm_debug_enabled() to check __drm_debug & DRM_UT_<CAT> before printing.
But the whole point of CONFIG_DRM_USE_DYNAMIC_DEBUG is to avoid that runtime test, by enabling (at end/after module_init) a static-key at selected callsites in the just-loaded module.
And since drm.ko is loaded before all dependent modules, no other modules are "just-loaded", and their drm.debug callsites are not present yet, just those in drm.ko itself.
---
.v2 - default=N, cuz CI tests BROKEN stuff too. @ville.syrjala
--- drivers/gpu/drm/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/Kconfig +2 -1
@@ -53,7 +53,8 @@ config DRM_DEBUG_MM config DRM_USE_DYNAMIC_DEBUG bool "use dynamic debug to implement drm.debug" - default y + default n + depends on BROKEN # chicken-egg initial enable problem depends on DRM depends on DYNAMIC_DEBUG || DYNAMIC_DEBUG_CORE depends on JUMP_LABEL
Signature · 1 line
2.38.1
PATCH 2/2 drm_print: fix stale macro-name in comment
In reply to Jim CromieCited commit uses stale macro name, fix this, and explain better.
When DRM_USE_DYNAMIC_DEBUG=y, DYNDBG_CLASSMAP_DEFINE() maps DRM_UT_* onto BITs in drm.debug. This still uses enum drm_debug_category, but it is somewhat indirect, with the ordered set of DRM_UT_* enum-vals. This requires that the macro args: DRM_UT_* list must be kept in sync and in order.
---
. emphasize ABI non-change despite enum val change - Jani Nikula . reorder to back of patchset to follow API name changes.
--- include/drm/drm_print.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
include/drm/drm_print.h +4 -1
@@ -276,7 +276,10 @@ static inline struct drm_printer drm_err_printer(const char *prefix)* */ enum drm_debug_category { -/* These names must match those in DYNAMIC_DEBUG_CLASSBITS */ +/* +* Keep DYNDBG_CLASSMAP_DEFINE args in sync with changes here, +* the enum-values define BIT()s in drm.debug, so are ABI. +*/ /** * @DRM_UT_CORE: Used in the generic drm code: drm_ioctl.c, drm_mm.c, * drm_memory.c, ...
Signature · 1 line
2.38.1
Re: [PATCH 2/2] drm_print: fix stale macro-name in comment
Quoted 10 lines · Jim Cromie
Cited commit uses stale macro name, fix this, and explain better.
When DRM_USE_DYNAMIC_DEBUG=y,
DYNDBG_CLASSMAP_DEFINE()maps DRM_UT_* onto BITs in drm.debug. This still uses enumdrm_debug_category, but it is somewhat indirect, with the ordered set of DRM_UT_* enum-vals. This requires that the macro args: DRM_UT_* list must be kept in sync and in order.Fixes f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.")Signed-off-by Jim Cromie <[email protected]>
What's the status of this series?
Greg, you landed the original entire pile that wasn't quite ready yet? Or should I apply these two?
-Daniel
Quoted 26 lines
---
. emphasize ABI non-change despite enum val change - Jani Nikula . reorder to back of patchset to follow API name changes.--- include/drm/drm_print.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)include/drm/drm_print.h +4
-1@@ -276,7 +276,10 @@ static inline struct drm_printer drm_err_printer(const char *prefix)* */ enum drm_debug_category { -/* These names must match those in DYNAMIC_DEBUG_CLASSBITS */ +/* +* Keep DYNDBG_CLASSMAP_DEFINE args in sync with changes here, +* the enum-values define BIT()s in drm.debug, so are ABI. +*/ /** * @DRM_UT_CORE: Used in the generic drm code: drm_ioctl.c, drm_mm.c, * drm_memory.c, ... Signature · 1 line
2.38.1
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Re: [PATCH 2/2] drm_print: fix stale macro-name in comment
Quoted 10 lines · Daniel Vetter
Quoted 8 lines · Jim Cromie
Cited commit uses stale macro name, fix this, and explain better.
When DRM_USE_DYNAMIC_DEBUG=y,
DYNDBG_CLASSMAP_DEFINE()maps DRM_UT_* onto BITs in drm.debug. This still uses enumdrm_debug_category, but it is somewhat indirect, with the ordered set of DRM_UT_* enum-vals. This requires that the macro args: DRM_UT_* list must be kept in sync and in order.
Quoted 5 lines
Quoted 2 lines
Fixes f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.")Signed-off-by Jim Cromie <[email protected]>What's the status of this series?
dead - superseded by
https://patchwork.freedesktop.org/series/111652/
which is still WIP, but improved since that post. I'll resubmit soon, with same title so patchwork calls it rev 2
Quoted 35 lines
Greg, you landed the original entire pile that wasn't quite ready yet? Or should I apply these two?
-DanielQuoted 24 lines
---
. emphasize ABI non-change despite enum val change - Jani Nikula . reorder to back of patchset to follow API name changes.--- include/drm/drm_print.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)include/drm/drm_print.h +4
-2@@ -276,7 +276,10 @@ static inline struct drm_printer drm_err_printer(const char *prefix)* */ enum drm_debug_category { -/* These names must match those in DYNAMIC_DEBUG_CLASSBITS */ +/* +* Keep DYNDBG_CLASSMAP_DEFINE args in sync with changes here, +* the enum-values define BIT()s in drm.debug, so are ABI. +*/ /** * @DRM_UT_CORE: Used in the generic drm code: drm_ioctl.c, drm_mm.c, * drm_memory.c, ... -- Quoted 2 lines
2.38.1
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for DRM - avoid regression in -rc, fix comment
In reply to Jim Cromie== Series Details ==
== Series Details ==
Series: DRM - avoid regression in -rc, fix comment
URL : https://patchwork.freedesktop.org/series/111631/
State : failure
== Summary ==
Error: patch https://patchwork.freedesktop.org/api/1.0/series/111631/revisions/1/mbox/ not applied
Applying: drm: mark CONFIG_DRM_USE_DYNAMIC_DEBUG as BROKEN for now
Using index info to reconstruct a base tree...
M drivers/gpu/drm/Kconfig
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/Kconfig
CONFLICT (content): Merge conflict in drivers/gpu/drm/Kconfig
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 drm: mark CONFIG_DRM_USE_DYNAMIC_DEBUG as BROKEN for now
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Re: [Intel-gfx] ✗ Fi.CI.BUILD: failure for DRM - avoid regression in -rc, fix comment
Quoted 10 lines · Patchwork
== Series Details ==
Series: DRM - avoid regression in -rc, fix comment
URL : https://patchwork.freedesktop.org/series/111631/
State : failure== Summary ==
Error: patch https://patchwork.freedesktop.org/api/1.0/series/111631/revisions/1/mbox/ not applied
whats the right upstream to avoid misapplies ?