From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [RFC 18/44] drm/i915: Added scheduler debug macro Date: Wed, 2 Jul 2014 11:37:29 -0700 Message-ID: <20140702113729.1132beeb@jbarnes-desktop> References: <1403803475-16337-1-git-send-email-John.C.Harrison@Intel.com> <1403803475-16337-19-git-send-email-John.C.Harrison@Intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by gabe.freedesktop.org (Postfix) with ESMTP id F39A36E360 for ; Wed, 2 Jul 2014 11:36:44 -0700 (PDT) Received: by mail-pd0-f169.google.com with SMTP id g10so12406792pdj.28 for ; Wed, 02 Jul 2014 11:36:44 -0700 (PDT) In-Reply-To: <1403803475-16337-19-git-send-email-John.C.Harrison@Intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: John.C.Harrison@Intel.com Cc: Intel-GFX@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, 26 Jun 2014 18:24:09 +0100 John.C.Harrison@Intel.com wrote: > From: John Harrison > > 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. > 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 -- Jesse Barnes, Intel Open Source Technology Center