Commit b56d2082 authored by Rodrigo Vivi's avatar Rodrigo Vivi

drm/xe: Stop using i915_utils in xe_wopcm.

We don't need any macro for a simple check we can do explicitly
and clear.
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
parent b6f468b8
...@@ -11,8 +11,6 @@ ...@@ -11,8 +11,6 @@
#include "xe_uc_fw.h" #include "xe_uc_fw.h"
#include "xe_wopcm.h" #include "xe_wopcm.h"
#include "i915_utils.h"
/** /**
* DOC: Write Once Protected Content Memory (WOPCM) Layout * DOC: Write Once Protected Content Memory (WOPCM) Layout
* *
...@@ -92,7 +90,8 @@ static bool __check_layout(struct xe_device *xe, u32 wopcm_size, ...@@ -92,7 +90,8 @@ static bool __check_layout(struct xe_device *xe, u32 wopcm_size,
u32 size; u32 size;
size = wopcm_size - ctx_rsvd; size = wopcm_size - ctx_rsvd;
if (unlikely(range_overflows(guc_wopcm_base, guc_wopcm_size, size))) { if (unlikely(guc_wopcm_base >= size ||
guc_wopcm_size > size - guc_wopcm_base)) {
drm_err(&xe->drm, drm_err(&xe->drm,
"WOPCM: invalid GuC region layout: %uK + %uK > %uK\n", "WOPCM: invalid GuC region layout: %uK + %uK > %uK\n",
guc_wopcm_base / SZ_1K, guc_wopcm_size / SZ_1K, guc_wopcm_base / SZ_1K, guc_wopcm_size / SZ_1K,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment