Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: intel-xe@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"Matthew Auld" <matthew.auld@intel.com>,
	"Matthew Brost" <matthew.brost@intel.com>
Subject: [PATCH] drm/xe: Don't allow XE_VALIDATION_UNIMPLEMENTED outside of debug builds
Date: Mon,  5 Oct 2026 15:51:35 +0200	[thread overview]
Message-ID: <20261005135135.161447-1-thomas.hellstrom@linux.intel.com> (raw)

The XE_VALIDATION_UNIMPLEMENTED macro is only intended for convenience
use during development. It is not allowed in production builds.

Ensure that by conditioning it on CONFIG_DRM_XE_DEBUG.

Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
 drivers/gpu/drm/xe/xe_validation.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_validation.h b/drivers/gpu/drm/xe/xe_validation.h
index 4cd955ce6cd2..e3a5385ef1c3 100644
--- a/drivers/gpu/drm/xe/xe_validation.h
+++ b/drivers/gpu/drm/xe/xe_validation.h
@@ -48,9 +48,11 @@ static inline void xe_validation_lockdep(void)
  * XE_VALIDATION_OPT_OUT is for simplification of kunit tests where
  * exhaustive eviction isn't necessary.
  */
+#ifdef CONFIG_DRM_XE_DEBUG
 #define __XE_VAL_UNIMPLEMENTED -EINVAL
 #define XE_VALIDATION_UNIMPLEMENTED (xe_validation_lockdep(),		\
 				     (struct drm_exec *)ERR_PTR(__XE_VAL_UNIMPLEMENTED))
+#endif
 
 #define __XE_VAL_UNSUPPORTED -EOPNOTSUPP
 #define XE_VALIDATION_UNSUPPORTED ((struct drm_exec *)ERR_PTR(__XE_VAL_UNSUPPORTED))
-- 
2.55.0


             reply	other threads:[~2026-10-05 13:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05 13:51 Thomas Hellström [this message]
2026-10-05 13:59 ` ✓ CI.KUnit: success for drm/xe: Don't allow XE_VALIDATION_UNIMPLEMENTED outside of debug builds Patchwork
2026-10-05 14:05 ` [PATCH] " Matthew Auld
2026-10-05 14:52 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-10-05 21:32 ` ✓ Xe.CI.FULL: " 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=20261005135135.161447-1-thomas.hellstrom@linux.intel.com \
    --to=thomas.hellstrom@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.auld@intel.com \
    --cc=matthew.brost@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox