summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_guc.c
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2023-01-13 01:25:04 +0300
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-12 22:05:59 +0300
commit86011ae21c15a779dcf25b97d5670371dc14e4c3 (patch)
tree0ec3ddf7c3c5c73b65b1d26238a4beb112809439 /drivers/gpu/drm/xe/xe_guc.c
parent0f06dc101972d598d1c6bb356436c3dbf1e4b646 (diff)
downloadlinux-86011ae21c15a779dcf25b97d5670371dc14e4c3.tar.xz
drm/xe: Stop using i915's range_overflows_t macro.
Let's do it directly. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_guc.c')
-rw-r--r--drivers/gpu/drm/xe/xe_guc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index 969a2427b1f2..9234da06d205 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -25,7 +25,7 @@
#include <linux/delay.h>
/*
* FIXME: This header has been deemed evil and we need to kill it. Temporarily
- * including so we can use 'wait_for' and range_overflow_t.
+ * including so we can use 'wait_for'.
*/
#include "i915_utils.h"
@@ -55,7 +55,8 @@ static u32 guc_bo_ggtt_addr(struct xe_guc *guc,
u32 addr = xe_bo_ggtt_addr(bo);
XE_BUG_ON(addr < xe_wopcm_size(guc_to_xe(guc)));
- XE_BUG_ON(range_overflows_t(u32, addr, bo->size, GUC_GGTT_TOP));
+ XE_BUG_ON(addr >= GUC_GGTT_TOP);
+ XE_BUG_ON(bo->size > GUC_GGTT_TOP - addr);
return addr;
}