Re: [PATCH v2 44/59] drm-dyndbg: add DRM_CLASSMAP_USE to Xe driver

From: Louis Chauvet
Date: Mon Mar 24 2025 - 11:28:41 EST




Le 20/03/2025 à 19:52, Jim Cromie a écrit :
Invoke DRM_CLASSMAP_USE from xe_drm_client.c. When built with
CONFIG_DRM_USE_DYNAMIC_DEBUG=y, this tells dydnbg that Xe uses
has drm.debug calls.

Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
---
drivers/gpu/drm/xe/xe_drm_client.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_drm_client.c b/drivers/gpu/drm/xe/xe_drm_client.c
index 2d4874d2b922..756dba5c88f8 100644
--- a/drivers/gpu/drm/xe/xe_drm_client.c
+++ b/drivers/gpu/drm/xe/xe_drm_client.c
@@ -21,6 +21,8 @@
#include "xe_pm.h"
#include "xe_trace.h"
+DRM_CLASSMAP_USE(drm_debug_classes);
+

Is xe_drm_client.c the best place to do it? I think the module entry point is a bit better [1].

[1]:https://elixir.bootlin.com/linux/v6.13.7/source/drivers/gpu/drm/xe/xe_module.c

/**
* DOC: DRM Client usage stats
*

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