Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/gem: Do not look for the exact address in node

In preparation for the upcoming partial memory mapping feature,
we want to make sure that when looking for a node we consider
also the offset and not just the starting address of the virtual
memory node.

Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240807100521.478266-2-andi.shyti@linux.intel.com

+3 -3
+3 -3
drivers/gpu/drm/i915/gem/i915_gem_mman.c
··· 1079 1079 1080 1080 rcu_read_lock(); 1081 1081 drm_vma_offset_lock_lookup(dev->vma_offset_manager); 1082 - node = drm_vma_offset_exact_lookup_locked(dev->vma_offset_manager, 1083 - vma->vm_pgoff, 1084 - vma_pages(vma)); 1082 + node = drm_vma_offset_lookup_locked(dev->vma_offset_manager, 1083 + vma->vm_pgoff, 1084 + vma_pages(vma)); 1085 1085 if (node && drm_vma_node_is_allowed(node, priv)) { 1086 1086 /* 1087 1087 * Skip 0-refcnted objects as it is in the process of being