[PATCH v11 43/65] drm-dyndbg: DRM_CLASSMAP_USE in nouveau

Jim Cromie posted 65 patches 3 weeks, 3 days ago
[PATCH v11 43/65] drm-dyndbg: DRM_CLASSMAP_USE in nouveau
Posted by Jim Cromie 3 weeks, 3 days ago
Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with
DRM_CLASSMAP_USE.  This refs the defined & exported classmap, rather
than re-declaring it redundantly, and error-prone-ly.

This resolves the appearance of "class:_UNKNOWN_" in the control file
for the driver's drm_dbg()s.

Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.")

Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
---
 drivers/gpu/drm/nouveau/nouveau_drm.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c
index 5d8475e4895e..d205b58aff70 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
@@ -74,17 +74,7 @@
 #include "nouveau_uvmm.h"
 #include "nouveau_sched.h"
 
-DECLARE_DYNDBG_CLASSMAP(drm_debug_classes, DD_CLASS_TYPE_DISJOINT_BITS, 0,
-			"DRM_UT_CORE",
-			"DRM_UT_DRIVER",
-			"DRM_UT_KMS",
-			"DRM_UT_PRIME",
-			"DRM_UT_ATOMIC",
-			"DRM_UT_VBL",
-			"DRM_UT_STATE",
-			"DRM_UT_LEASE",
-			"DRM_UT_DP",
-			"DRM_UT_DRMRES");
+DRM_CLASSMAP_USE(drm_debug_classes);
 
 MODULE_PARM_DESC(config, "option string to pass to driver core");
 static char *nouveau_config;
-- 
2.53.0
Re: [PATCH v11 43/65] drm-dyndbg: DRM_CLASSMAP_USE in nouveau
Posted by lyude@redhat.com 2 weeks, 3 days ago
Reviewed-by: Lyude Paul <lyude@redhat.com>

On Fri, 2026-03-13 at 07:20 -0600, Jim Cromie wrote:
> Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with
> DRM_CLASSMAP_USE.  This refs the defined & exported classmap, rather
> than re-declaring it redundantly, and error-prone-ly.
> 
> This resolves the appearance of "class:_UNKNOWN_" in the control file
> for the driver's drm_dbg()s.
> 
> Fixes: f158936b60a7 ("drm: POC drm on dyndbg - use in core, 2
> helpers, 3 drivers.")
> 
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
> ---
>  drivers/gpu/drm/nouveau/nouveau_drm.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c
> b/drivers/gpu/drm/nouveau/nouveau_drm.c
> index 5d8475e4895e..d205b58aff70 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_drm.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c
> @@ -74,17 +74,7 @@
>  #include "nouveau_uvmm.h"
>  #include "nouveau_sched.h"
>  
> -DECLARE_DYNDBG_CLASSMAP(drm_debug_classes,
> DD_CLASS_TYPE_DISJOINT_BITS, 0,
> -			"DRM_UT_CORE",
> -			"DRM_UT_DRIVER",
> -			"DRM_UT_KMS",
> -			"DRM_UT_PRIME",
> -			"DRM_UT_ATOMIC",
> -			"DRM_UT_VBL",
> -			"DRM_UT_STATE",
> -			"DRM_UT_LEASE",
> -			"DRM_UT_DP",
> -			"DRM_UT_DRMRES");
> +DRM_CLASSMAP_USE(drm_debug_classes);
>  
>  MODULE_PARM_DESC(config, "option string to pass to driver core");
>  static char *nouveau_config;
Re: [PATCH v11 43/65] drm-dyndbg: DRM_CLASSMAP_USE in nouveau
Posted by Louis Chauvet 2 weeks, 3 days ago
On Fri, 13 Mar 2026 07:20:08 -0600, Jim Cromie <jim.cromie@gmail.com> wrote:
> Following the dyndbg-api-fix, replace DECLARE_DYNDBG_CLASSMAP with
> DRM_CLASSMAP_USE.  This refs the defined & exported classmap, rather
> than re-declaring it redundantly, and error-prone-ly.
> 
> This resolves the appearance of "class:_UNKNOWN_" in the control file
> for the driver's drm_dbg()s.
> 
> [...]

Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>

-- 
Louis Chauvet <louis.chauvet@bootlin.com>