All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: "David Zhou" <David1.Zhou@amd.com>,
	jani.nikula@intel.com, intel-gfx@lists.freedesktop.org,
	amd-gfx@lists.freedesktop.org,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: [PATCH 8/9] drm/amdgpu: use drm_debug_enabled() to check for debug categories
Date: Fri, 13 Sep 2019 14:51:45 +0300	[thread overview]
Message-ID: <6ba0f21e48118bebd88eb7ba24b5b68b0be49f63.1568375189.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1568375189.git.jani.nikula@intel.com>

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

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David (ChunMing) Zhou <David1.Zhou@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
index 4a5951036927..5f17bd4899e2 100644
--- a/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
+++ b/drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
@@ -234,7 +234,7 @@ static uint32_t smu_v11_0_i2c_transmit(struct i2c_adapter *control,
 	DRM_DEBUG_DRIVER("I2C_Transmit(), address = %x, bytes = %d , data: ",
 		 (uint16_t)address, numbytes);
 
-	if (drm_debug & DRM_UT_DRIVER) {
+	if (drm_debug_enabled(DRM_UT_DRIVER)) {
 		print_hex_dump(KERN_INFO, "data: ", DUMP_PREFIX_NONE,
 			       16, 1, data, numbytes, false);
 	}
@@ -388,7 +388,7 @@ static uint32_t smu_v11_0_i2c_receive(struct i2c_adapter *control,
 	DRM_DEBUG_DRIVER("I2C_Receive(), address = %x, bytes = %d, data :",
 		  (uint16_t)address, bytes_received);
 
-	if (drm_debug & DRM_UT_DRIVER) {
+	if (drm_debug_enabled(DRM_UT_DRIVER)) {
 		print_hex_dump(KERN_INFO, "data: ", DUMP_PREFIX_NONE,
 			       16, 1, data, bytes_received, false);
 	}
-- 
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-13 11:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-13 11:51 [PATCH 0/9] drm/print: add and use drm_debug_enabled() Jani Nikula
2019-09-13 11:51 ` Jani Nikula
2019-09-13 11:51 ` [PATCH 1/9] drm/print: move drm_debug variable to drm_print.[ch] Jani Nikula
2019-09-13 11:51 ` [PATCH 2/9] drm/print: add drm_debug_enabled() Jani Nikula
2019-09-13 13:07   ` Eric Engestrom
2019-09-16  8:53     ` Jani Nikula
2019-09-16 11:56       ` Eric Engestrom
2019-09-16 13:23         ` Jani Nikula
2019-09-20 11:51           ` Eric Engestrom
2019-09-13 11:51 ` [PATCH 3/9] drm/etnaviv: use drm_debug_enabled() to check for debug categories Jani Nikula
2019-09-13 14:24   ` Lucas Stach
2019-09-13 11:51 ` [PATCH 4/9] drm/i2c/sil164: " Jani Nikula
2019-09-13 11:51 ` [PATCH 5/9] drm/i915: " Jani Nikula
2019-09-13 11:51 ` [PATCH 6/9] drm/msm: " Jani Nikula
2019-09-13 11:51   ` Jani Nikula
2019-09-14 15:46   ` Rob Clark
2019-09-14 15:46     ` Rob Clark
2019-09-13 11:51 ` [PATCH 7/9] drm/nouveau: " Jani Nikula
2019-09-13 11:51 ` Jani Nikula [this message]
2019-09-13 11:51 ` [PATCH 9/9] drm/print: rename drm_debug to __drm_debug to discourage use Jani Nikula
2019-09-13 15:17 ` ✓ Fi.CI.BAT: success for drm/print: add and use drm_debug_enabled() Patchwork
2019-09-14 15:22 ` ✓ Fi.CI.IGT: " Patchwork

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=6ba0f21e48118bebd88eb7ba24b5b68b0be49f63.1568375189.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=David1.Zhou@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@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.