All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [PATCH 03/10] drm/i915: move I915_STATE_WARN() and _ON() to intel_display.h
Date: Thu,  8 Aug 2019 16:42:42 +0300	[thread overview]
Message-ID: <8fefcf69b6dcdb7b9c920aeded35c5f8928b9602.1565271681.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1565271681.git.jani.nikula@intel.com>

It's for display. Seems like a better fit. Reduce clutter in i915_drv.h.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.h | 18 ++++++++++++++++++
 drivers/gpu/drm/i915/i915_drv.h              | 18 ------------------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h
index bf0d7225e649..e57e6969051d 100644
--- a/drivers/gpu/drm/i915/display/intel_display.h
+++ b/drivers/gpu/drm/i915/display/intel_display.h
@@ -571,4 +571,22 @@ void assert_pipe(struct drm_i915_private *dev_priv, enum pipe pipe, bool state);
 #define assert_pipe_enabled(d, p) assert_pipe(d, p, true)
 #define assert_pipe_disabled(d, p) assert_pipe(d, p, false)
 
+/* Use I915_STATE_WARN(x) and I915_STATE_WARN_ON() (rather than WARN() and
+ * WARN_ON()) for hw state sanity checks to check for unexpected conditions
+ * which may not necessarily be a user visible problem.  This will either
+ * WARN() or DRM_ERROR() depending on the verbose_checks moduleparam, to
+ * enable distros and users to tailor their preferred amount of i915 abrt
+ * spam.
+ */
+#define I915_STATE_WARN(condition, format...) ({			\
+	int __ret_warn_on = !!(condition);				\
+	if (unlikely(__ret_warn_on))					\
+		if (!WARN(i915_modparams.verbose_state_checks, format))	\
+			DRM_ERROR(format);				\
+	unlikely(__ret_warn_on);					\
+})
+
+#define I915_STATE_WARN_ON(x)						\
+	I915_STATE_WARN((x), "%s", "WARN_ON(" __stringify(x) ")")
+
 #endif
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 7c4e95173ec4..21c87309cc32 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -104,24 +104,6 @@
 #define DRIVER_DATE		"20190730"
 #define DRIVER_TIMESTAMP	1564512624
 
-/* Use I915_STATE_WARN(x) and I915_STATE_WARN_ON() (rather than WARN() and
- * WARN_ON()) for hw state sanity checks to check for unexpected conditions
- * which may not necessarily be a user visible problem.  This will either
- * WARN() or DRM_ERROR() depending on the verbose_checks moduleparam, to
- * enable distros and users to tailor their preferred amount of i915 abrt
- * spam.
- */
-#define I915_STATE_WARN(condition, format...) ({			\
-	int __ret_warn_on = !!(condition);				\
-	if (unlikely(__ret_warn_on))					\
-		if (!WARN(i915_modparams.verbose_state_checks, format))	\
-			DRM_ERROR(format);				\
-	unlikely(__ret_warn_on);					\
-})
-
-#define I915_STATE_WARN_ON(x)						\
-	I915_STATE_WARN((x), "%s", "WARN_ON(" __stringify(x) ")")
-
 #if IS_ENABLED(CONFIG_DRM_I915_DEBUG)
 
 int __i915_inject_load_error(struct drm_i915_private *i915, int err,
-- 
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-08-08 13:43 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-08 13:42 [PATCH 00/10] drm/i915: header cleanup of the day Jani Nikula
2019-08-08 13:42 ` [PATCH 01/10] drm/i915: remove unused dev_priv->no_aux_handshake Jani Nikula
2019-08-08 13:44   ` Chris Wilson
2019-08-08 13:42 ` [PATCH 02/10] drm/i915: move add_taint_for_CI() to i915_utils.h Jani Nikula
2019-08-08 13:42 ` Jani Nikula [this message]
2019-08-08 13:42 ` [PATCH 04/10] drm/i915: move printing and load error inject to i915_utils.[ch] Jani Nikula
2019-08-08 13:42 ` [PATCH 05/10] drm/i915: extract i915_perf.h from i915_drv.h Jani Nikula
2019-08-08 13:42 ` [PATCH 06/10] drm/i915: extract i915_sysfs.h " Jani Nikula
2019-08-08 13:42 ` [PATCH 07/10] drm/i915: extract i915_suspend.h " Jani Nikula
2019-08-08 13:42 ` [PATCH 08/10] drm/i915: extract i915_memcpy.h " Jani Nikula
2019-08-08 13:42 ` [PATCH 09/10] drm/i915: extract gem/i915_gem_stolen.h " Jani Nikula
2019-08-08 13:42 ` [PATCH 10/10] drm/i915: extract i915_gem_shrinker.h " Jani Nikula
2019-08-08 13:54 ` [PATCH 00/10] drm/i915: header cleanup of the day Chris Wilson
2019-08-09  9:53   ` Jani Nikula
2019-08-08 14:51 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-08-08 14:57 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-08-08 15:16 ` ✓ Fi.CI.BAT: success " Patchwork
2019-08-09  0:24 ` ✓ 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=8fefcf69b6dcdb7b9c920aeded35c5f8928b9602.1565271681.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --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.