[PATCH v3 2/4] drm/i915: Replaced hardcoded value 4095 with PAGE_SIZE - 1
Sebastian Brzezinka
sebastian.brzezinka at intel.com
Fri Jul 18 10:28:11 UTC 2025
The value 4095 is intended to represent PAGE_SIZE - 1, as stated
in the commit that introduced this change:
commit 5f22cc0b134a ("drm/i915: Fix mismatch between misplaced
vma check and vma insert")
Signed-off-by: Sebastian Brzezinka <sebastian.brzezinka at intel.com>
---
v2 -> v3:
- Reword commit message to clarify that the value 4095
is intended to represent PAGE_SIZE - 1
---
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
index 0801d4a140e3..42a525f28f3e 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
@@ -397,7 +397,7 @@ eb_vma_misplaced(const struct drm_i915_gem_exec_object2 *entry,
return true;
if (!(flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) &&
- (start + size + 4095) >> 32)
+ (start + size + PAGE_SIZE - 1) >> 32)
return true;
if (flags & __EXEC_OBJECT_NEEDS_MAP &&
--
2.34.1
More information about the Intel-gfx
mailing list