Re: [RFC 18/44] drm/i915: Added scheduler debug macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 02, 2014 at 11:37:29AM -0700, Jesse Barnes wrote:
> On Thu, 26 Jun 2014 18:24:09 +0100
> John.C.Harrison@xxxxxxxxx wrote:
> 
> > From: John Harrison <John.C.Harrison@xxxxxxxxx>
> > 
> > Added a DRM debug facility for use by the scheduler.
> > ---
> >  include/drm/drmP.h |    7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/include/drm/drmP.h b/include/drm/drmP.h
> > index 76ccaab..2f477c9 100644
> > --- a/include/drm/drmP.h
> > +++ b/include/drm/drmP.h
> > @@ -120,6 +120,7 @@ struct videomode;
> >  #define DRM_UT_DRIVER		0x02
> >  #define DRM_UT_KMS		0x04
> >  #define DRM_UT_PRIME		0x08
> > +#define DRM_UT_SCHED		0x40
> 
> What's wrong with 0x10?  We should probably define these in terms of
> shifts anyway, since this is just a bitmask really.

If we want more fine-grained logging we need to use real infrastructure
like dynamic printk or similar things. The current drm_debug stuff
flat-out doesn't scale for debugging random issues and I always use
drm.debug=0xe anyway. Also the i915 scheduler isn't core drm coe so really
should be DRM_DEBUG_DRIVER or so.
-Daniel

> 
> >  extern __printf(2, 3)
> >  void drm_ut_debug_printk(const char *function_name,
> > @@ -221,10 +222,16 @@ int drm_err(const char *func, const char *format, ...);
> >  		if (unlikely(drm_debug & DRM_UT_PRIME))			\
> >  			drm_ut_debug_printk(__func__, fmt, ##args);	\
> >  	} while (0)
> > +#define DRM_DEBUG_SCHED(fmt, args...)					\
> > +	do {								\
> > +		if (unlikely(drm_debug & DRM_UT_SCHED))			\
> > +			drm_ut_debug_printk(__func__, fmt, ##args);	\
> > +	} while (0)
> >  #else
> >  #define DRM_DEBUG_DRIVER(fmt, args...) do { } while (0)
> >  #define DRM_DEBUG_KMS(fmt, args...)	do { } while (0)
> >  #define DRM_DEBUG_PRIME(fmt, args...)	do { } while (0)
> > +#define DRM_DEBUG_SCHED(fmt, args...)	do { } while (0)
> >  #define DRM_DEBUG(fmt, arg...)		 do { } while (0)
> >  #endif
> >  
> 
> Reviewed-by: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
> 
> -- 
> Jesse Barnes, Intel Open Source Technology Center
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux