Commit cf2cbbc7 authored by Matthew Brost's avatar Matthew Brost
Browse files

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 <rodrigo.vivi@intel.com>
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240313184430.999397-1-matthew.brost@intel.com
parent 023f5c8e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)