diff mbox series

[v2,47/59] drm-dyndbg: add DRM_CLASSMAP_USE to bochs

Message ID 20250320185238.447458-48-jim.cromie@gmail.com (mailing list archive)
State New, archived
Headers show
Series Fix CONFIG_DRM_USE_DYNAMIC_DEBUG=y | expand

Commit Message

Jim Cromie March 20, 2025, 6:52 p.m. UTC
tiny/bochs has 5 DRM_UT_* debugs, make them controllable when
CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
class'd debugs.

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

Comments

Louis Chauvet March 24, 2025, 3:03 p.m. UTC | #1
Le 20/03/2025 à 19:52, Jim Cromie a écrit :
> tiny/bochs has 5 DRM_UT_* debugs, make them controllable when
> CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
> class'd debugs.
> 
> Signed-off-by: Jim Cromie <jim.cromie@gmail.com>

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

> ---
>   drivers/gpu/drm/tiny/bochs.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c
> index 8706763af8fb..dbcc8ba70dfa 100644
> --- a/drivers/gpu/drm/tiny/bochs.c
> +++ b/drivers/gpu/drm/tiny/bochs.c
> @@ -59,6 +59,8 @@ static int bochs_modeset = -1;
>   static int defx = 1024;
>   static int defy = 768;
>   
> +DRM_CLASSMAP_USE(drm_debug_classes);

Do we need to add it for each driver that use drm_* print macros? Is it 
reasonable to add this directly in drm_print.h, so there is no way to 
miss this call if you use drm_* macros.

>   module_param_named(modeset, bochs_modeset, int, 0444);
>   MODULE_PARM_DESC(modeset, "enable/disable kernel modesetting");
>
Jim Cromie March 25, 2025, 7:34 p.m. UTC | #2
On Mon, Mar 24, 2025 at 9:03 AM Louis Chauvet <louis.chauvet@bootlin.com> wrote:
>
>
>
> Le 20/03/2025 à 19:52, Jim Cromie a écrit :
> > tiny/bochs has 5 DRM_UT_* debugs, make them controllable when
> > CONFIG_DRM_USE_DYNAMIC_DEBUG=y by telling dyndbg that the module has
> > class'd debugs.
> >
> > Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
>
> Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
>
> > ---
> >   drivers/gpu/drm/tiny/bochs.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c
> > index 8706763af8fb..dbcc8ba70dfa 100644
> > --- a/drivers/gpu/drm/tiny/bochs.c
> > +++ b/drivers/gpu/drm/tiny/bochs.c
> > @@ -59,6 +59,8 @@ static int bochs_modeset = -1;
> >   static int defx = 1024;
> >   static int defy = 768;
> >
> > +DRM_CLASSMAP_USE(drm_debug_classes);
>
> Do we need to add it for each driver that use drm_* print macros? Is it
> reasonable to add this directly in drm_print.h, so there is no way to
> miss this call if you use drm_* macros.
>

Yes, AFAIK.
Ive tried to invoke declarators from a header,
It never works out.

59/59 was an attempt to do it for everyone, but it falls down...

> >   module_param_named(modeset, bochs_modeset, int, 0444);
> >   MODULE_PARM_DESC(modeset, "enable/disable kernel modesetting");
> >
>
> --
> Louis Chauvet, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c
index 8706763af8fb..dbcc8ba70dfa 100644
--- a/drivers/gpu/drm/tiny/bochs.c
+++ b/drivers/gpu/drm/tiny/bochs.c
@@ -59,6 +59,8 @@  static int bochs_modeset = -1;
 static int defx = 1024;
 static int defy = 768;
 
+DRM_CLASSMAP_USE(drm_debug_classes);
+
 module_param_named(modeset, bochs_modeset, int, 0444);
 MODULE_PARM_DESC(modeset, "enable/disable kernel modesetting");