All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: jani.nikula@intel.com, nouveau@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org, Ben Skeggs <bskeggs@redhat.com>
Subject: [PATCH v2 7/9] drm/nouveau: use drm_debug_enabled() to check for debug categories
Date: Tue, 24 Sep 2019 15:59:03 +0300	[thread overview]
Message-ID: <996684fc622c927220e59cdd38532e5338707ea0.1569329774.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1569329774.git.jani.nikula@intel.com>

Allow better abstraction of the drm_debug global variable in the
future. No functional changes.

v2: move unlikely() to drm_debug_enabled()

Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: nouveau@lists.freedesktop.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/nouveau/dispnv50/disp.h | 4 ++--
 drivers/gpu/drm/nouveau/nouveau_drv.h   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.h b/drivers/gpu/drm/nouveau/dispnv50/disp.h
index 7c41b0599d1a..c0a79531b087 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.h
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.h
@@ -78,14 +78,14 @@ void evo_kick(u32 *, struct nv50_dmac *);
 
 #define evo_mthd(p, m, s) do {						\
 	const u32 _m = (m), _s = (s);					\
-	if (drm_debug & DRM_UT_KMS)					\
+	if (drm_debug_enabled(DRM_UT_KMS))				\
 		pr_err("%04x %d %s\n", _m, _s, __func__);		\
 	*((p)++) = ((_s << 18) | _m);					\
 } while(0)
 
 #define evo_data(p, d) do {						\
 	const u32 _d = (d);						\
-	if (drm_debug & DRM_UT_KMS)					\
+	if (drm_debug_enabled(DRM_UT_KMS))				\
 		pr_err("\t%08x\n", _d);					\
 	*((p)++) = _d;							\
 } while(0)
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h
index 70f34cacc552..da8c46e09943 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.h
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.h
@@ -248,11 +248,11 @@ void nouveau_drm_device_remove(struct drm_device *dev);
 #define NV_INFO(drm,f,a...) NV_PRINTK(info, &(drm)->client, f, ##a)
 
 #define NV_DEBUG(drm,f,a...) do {                                              \
-	if (unlikely(drm_debug & DRM_UT_DRIVER))                               \
+	if (drm_debug_enabled(DRM_UT_DRIVER))                                  \
 		NV_PRINTK(info, &(drm)->client, f, ##a);                       \
 } while(0)
 #define NV_ATOMIC(drm,f,a...) do {                                             \
-	if (unlikely(drm_debug & DRM_UT_ATOMIC))                               \
+	if (drm_debug_enabled(DRM_UT_ATOMIC))                                  \
 		NV_PRINTK(info, &(drm)->client, f, ##a);                       \
 } while(0)
 
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-09-24 12:59 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 12:58 [PATCH v2 0/9] drm/print: add and use drm_debug_enabled() Jani Nikula
2019-09-24 12:58 ` Jani Nikula
2019-09-24 12:58 ` [PATCH v2 1/9] drm/print: move drm_debug variable to drm_print.[ch] Jani Nikula
2019-09-24 17:45   ` Alex Deucher
2019-09-24 12:58 ` [PATCH v2 2/9] drm/print: add drm_debug_enabled() Jani Nikula
2019-09-24 17:45   ` Alex Deucher
2019-10-01 14:06   ` [PATCH v3] " Jani Nikula
2019-10-01 15:02     ` Eric Engestrom
2019-09-24 12:58 ` [PATCH v2 3/9] drm/etnaviv: use drm_debug_enabled() to check for debug categories Jani Nikula
2019-09-24 12:59 ` [PATCH v2 4/9] drm/i2c/sil164: " Jani Nikula
2019-09-24 19:29   ` Francisco Jerez
2019-09-24 12:59 ` [PATCH v2 5/9] drm/i915: " Jani Nikula
2019-09-24 12:59 ` [PATCH v2 6/9] drm/msm: " Jani Nikula
2019-09-24 12:59   ` Jani Nikula
2019-09-24 12:59 ` Jani Nikula [this message]
2019-09-24 12:59 ` [PATCH v2 8/9] drm/amdgpu: " Jani Nikula
2019-09-24 17:44   ` Alex Deucher
2019-09-24 12:59 ` [PATCH v2 9/9] drm/print: rename drm_debug to __drm_debug to discourage use Jani Nikula
2019-09-24 17:46   ` Alex Deucher
2019-09-24 14:15 ` ✓ Fi.CI.BAT: success for drm/print: add and use drm_debug_enabled() (rev2) Patchwork
2019-09-25  2:39 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-09-26  7:48 ` [PATCH v2 0/9] drm/print: add and use drm_debug_enabled() Eric Engestrom
2019-09-26  7:48   ` Eric Engestrom
2019-10-01 11:03   ` Jani Nikula
2019-10-01 11:03     ` Jani Nikula
2019-10-01 12:34     ` Eric Engestrom
2019-10-01 12:34       ` Eric Engestrom
2019-10-01 14:08       ` Jani Nikula
2019-10-01 14:08         ` Jani Nikula
2019-10-01 17:26 ` ✓ Fi.CI.BAT: success for drm/print: add and use drm_debug_enabled() (rev3) Patchwork
2019-10-02  1:45 ` ✓ Fi.CI.IGT: " Patchwork
2019-10-02 14:11 ` [PATCH v2 0/9] drm/print: add and use drm_debug_enabled() Jani Nikula
2019-10-02 14:11   ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=996684fc622c927220e59cdd38532e5338707ea0.1569329774.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=bskeggs@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=nouveau@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.