[PATCH v2 53/59] drm-dyndbg: add DRM_CLASSMAP_USE to udl driver

Jim Cromie posted 59 patches 9 months ago
There is a newer version of this series
[PATCH v2 53/59] drm-dyndbg: add DRM_CLASSMAP_USE to udl driver
Posted by Jim Cromie 9 months ago
The udl driver has a number of DRM_UT_* debugs, make them
controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
that the module uses them.

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

diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
index 3ebe2ce55dfd..ba57c14454e5 100644
--- a/drivers/gpu/drm/udl/udl_main.c
+++ b/drivers/gpu/drm/udl/udl_main.c
@@ -19,6 +19,8 @@
 
 #define NR_USB_REQUEST_CHANNEL 0x12
 
+DRM_CLASSMAP_USE(drm_debug_classes);
+
 #define MAX_TRANSFER (PAGE_SIZE*16 - BULK_SIZE)
 #define WRITES_IN_FLIGHT (20)
 #define MAX_VENDOR_DESCRIPTOR_SIZE 256
-- 
2.49.0
Re: [PATCH v2 53/59] drm-dyndbg: add DRM_CLASSMAP_USE to udl driver
Posted by Louis Chauvet 9 months ago

Le 20/03/2025 à 19:52, Jim Cromie a écrit :
> The udl driver has a number of DRM_UT_* debugs, make them
> controllable when CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg
> that the module uses them.
> 
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
> ---
>   drivers/gpu/drm/udl/udl_main.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
> index 3ebe2ce55dfd..ba57c14454e5 100644
> --- a/drivers/gpu/drm/udl/udl_main.c
> +++ b/drivers/gpu/drm/udl/udl_main.c
> @@ -19,6 +19,8 @@
>   
>   #define NR_USB_REQUEST_CHANNEL 0x12
>   
> +DRM_CLASSMAP_USE(drm_debug_classes);

ditto, is it better to put it near the module entry point [1]?

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

> +
>   #define MAX_TRANSFER (PAGE_SIZE*16 - BULK_SIZE)
>   #define WRITES_IN_FLIGHT (20)
>   #define MAX_VENDOR_DESCRIPTOR_SIZE 256

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