From cf2cbbc76dc4272fa156f4991fab1024b5815451 Mon Sep 17 00:00:00 2001 From: Matthew Brost Date: Wed, 13 Mar 2024 11:44:30 -0700 Subject: [PATCH] drm/xe: Use xe_assert in xe_device_assert_mem_access The implementation of xe_device_assert_mem_access has a non-zero cost. Use xe_assert rather than XE_WARN_ON so it will compile out in non-debug kernel builds (Kconfig CONFIG_DRM_XE_DEBUG=n). Cc: Rodrigo Vivi Signed-off-by: Matthew Brost Reviewed-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20240313184430.999397-1-matthew.brost@intel.com --- drivers/gpu/drm/xe/xe_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c index 919ad88f0495a..b0bfe75eb59f8 100644 --- a/drivers/gpu/drm/xe/xe_device.c +++ b/drivers/gpu/drm/xe/xe_device.c @@ -666,7 +666,7 @@ bool xe_device_mem_access_ongoing(struct xe_device *xe) */ void xe_device_assert_mem_access(struct xe_device *xe) { - XE_WARN_ON(xe_pm_runtime_suspended(xe)); + xe_assert(xe, !xe_pm_runtime_suspended(xe)); } bool xe_device_mem_access_get_if_ongoing(struct xe_device *xe) -- 2.30.2