diff mbox series

drm/vgem: Reclassify buffer creation debug message

Message ID 20190712120147.29830-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show
Series drm/vgem: Reclassify buffer creation debug message | expand

Commit Message

Chris Wilson July 12, 2019, 12:01 p.m. UTC
A buffer is created in response to the user ioctl, it should therefore
be a plain DRM_DEBUG() message to reflect it being a user invoked
response and not a driver construct.

This is just to make the commonplace drm.debug=[26e] quieter when
running with vgem.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/vgem/vgem_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Daniel Vetter July 12, 2019, 12:51 p.m. UTC | #1
On Fri, Jul 12, 2019 at 2:01 PM Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> A buffer is created in response to the user ioctl, it should therefore
> be a plain DRM_DEBUG() message to reflect it being a user invoked
> response and not a driver construct.
>
> This is just to make the commonplace drm.debug=[26e] quieter when
> running with vgem.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/vgem/vgem_drv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
> index 386efc3b5843..76d95b5e289c 100644
> --- a/drivers/gpu/drm/vgem/vgem_drv.c
> +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> @@ -214,7 +214,7 @@ static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
>         args->size = gem_object->size;
>         args->pitch = pitch;
>
> -       DRM_DEBUG_DRIVER("Created object of size %lld\n", size);
> +       DRM_DEBUG("Created object of size %lld\n", size);

Hm, I honestly dunno what DRM_DEBUG is for, except generating noise.
Maybe also ditch this outright. Either approach gets my

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

>
>         return 0;
>  }
> --
> 2.22.0
>
Chris Wilson July 12, 2019, 1:51 p.m. UTC | #2
Quoting Daniel Vetter (2019-07-12 13:51:58)
> On Fri, Jul 12, 2019 at 2:01 PM Chris Wilson <chris@chris-wilson.co.uk> wrote:
> >
> > A buffer is created in response to the user ioctl, it should therefore
> > be a plain DRM_DEBUG() message to reflect it being a user invoked
> > response and not a driver construct.
> >
> > This is just to make the commonplace drm.debug=[26e] quieter when
> > running with vgem.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> > ---
> >  drivers/gpu/drm/vgem/vgem_drv.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
> > index 386efc3b5843..76d95b5e289c 100644
> > --- a/drivers/gpu/drm/vgem/vgem_drv.c
> > +++ b/drivers/gpu/drm/vgem/vgem_drv.c
> > @@ -214,7 +214,7 @@ static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
> >         args->size = gem_object->size;
> >         args->pitch = pitch;
> >
> > -       DRM_DEBUG_DRIVER("Created object of size %lld\n", size);
> > +       DRM_DEBUG("Created object of size %lld\n", size);
> 
> Hm, I honestly dunno what DRM_DEBUG is for, except generating noise.
> Maybe also ditch this outright. Either approach gets my

Noise that sometimes may be useful in desperation. Is it more useful
than the ioctl reporting 0? A tiny bit more convincing/reassuring that
the driver is doing what you asked.

If we ever get a dynamic per-user/client debug log, this is certainly a
good candidate.
-Chris
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c
index 386efc3b5843..76d95b5e289c 100644
--- a/drivers/gpu/drm/vgem/vgem_drv.c
+++ b/drivers/gpu/drm/vgem/vgem_drv.c
@@ -214,7 +214,7 @@  static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
 	args->size = gem_object->size;
 	args->pitch = pitch;
 
-	DRM_DEBUG_DRIVER("Created object of size %lld\n", size);
+	DRM_DEBUG("Created object of size %lld\n", size);
 
 	return 0;
 }