[Intel-gfx] [PATCH] drm/i915: Introduce i915_dbg macro

Daniel Vetter daniel at ffwll.ch
Mon Jan 25 10:17:36 PST 2016


On Fri, Jan 22, 2016 at 05:54:15PM +0530, 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)

Yeah, dynamic debug is awesome, but imo completely useless if it means the
usual drm.debug=0xe doesn't work any more. What we imo need to roll this
is is to enable this for all the drm debug infrastructure. Maybe with a
compile option, or maybe with some hacks to make drm.debug=0xe still work.

Yes this is a pretty big project, but I really want a unified way to
enable debugging output for both drm and i915.

Thanks, Daniel

>  #define INTEL_INFO(p) 	(&__I915__(p)->info)
>  #define INTEL_DEVID(p)	(INTEL_INFO(p)->device_id)
>  #define INTEL_REVID(p)	(__I915__(p)->dev->pdev->revision)
> -- 
> 1.9.2
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list