[PATCH v2 39/59] drm-dyndbg: DRM_CLASSMAP_USE in amdgpu driver

Louis Chauvet louis.chauvet at bootlin.com
Mon Mar 24 15:24:21 UTC 2025



Le 20/03/2025 à 19:52, Jim Cromie a écrit :
> 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 at gmail.com>

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

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 12 +-----------
>   1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> index c0ddbe7d6f0b..e1367f66c4d2 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
> @@ -234,17 +234,7 @@ int amdgpu_wbrf = -1;
>   int amdgpu_damage_clips = -1; /* auto */
>   int amdgpu_umsch_mm_fwlog;
>   
> -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);
>   
>   struct amdgpu_mgpu_info mgpu_info = {
>   	.mutex = __MUTEX_INITIALIZER(mgpu_info.mutex),

-- 
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com




More information about the Intel-gfx-trybot mailing list