[Intel-gfx] [PATCH] drm/i915: Introduce i915_dbg macro
Chris Wilson
chris at chris-wilson.co.uk
Fri Jan 22 05:14:03 PST 2016
On Fri, Jan 22, 2016 at 12:49:01PM +0000, Arun Siluvery wrote:
> On 22/01/2016 12:24, akash.goel at intel.com wrote:
> >From: Akash Goel <akash.goel at intel.com>
> >
> >Added a new macro i915_dbg, which is a wrapper over dev_dbg macro.
> >dev_dbg allows use of dynamic debug framework, so offers a number
> >of advantages over DRM_DEBUG to debug user space startup issues.
> >Like provides more fine grain control by allowing to enable/disable
> >certain debug messages of interest on the fly, also allows filtering
> >of debug messages based on pid.
> >
> >Suggested-by: Chris Wilson <chris at chris-wilson.co.uk>
> >Signed-off-by: Akash Goel <akash.goel at intel.com>
> >---
> > drivers/gpu/drm/i915/i915_drv.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> >diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> >index bc7164f..749513f 100644
> >--- a/drivers/gpu/drm/i915/i915_drv.h
> >+++ b/drivers/gpu/drm/i915/i915_drv.h
> >@@ -2456,6 +2456,7 @@ struct drm_i915_cmd_table {
> > BUILD_BUG(); \
> > __p; \
> > })
> >+#define i915_dbg(DEV, args...) dev_dbg(__I915__(DEV)->dev->dev, ##args)
>
> i915_dev_dbg may be?
pr_debug
dev_dbg
i915_dbg
> is there any reason why we haven't used dev_dbg before in our driver?
It's much newer than DRM_DEBUG. There is a general consensus that we
should migrate DRM_DEBUG over to dev_dbg (since dprintk offers more fine
control over debug messages), just no plan of action.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list