Commit 609d8b1c authored by Andi Shyti's avatar Andi Shyti
Browse files

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: default avatarAndi Shyti <andi.shyti@linux.intel.com>
Reviewed-by: default avatarNirmoy Das <nirmoy.das@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240807100521.478266-2-andi.shyti@linux.intel.com
parent 0523374e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1079,7 +1079,7 @@ int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma)

	rcu_read_lock();
	drm_vma_offset_lock_lookup(dev->vma_offset_manager);
	node = drm_vma_offset_exact_lookup_locked(dev->vma_offset_manager,
	node = drm_vma_offset_lookup_locked(dev->vma_offset_manager,
					    vma->vm_pgoff,
					    vma_pages(vma));
	if (node && drm_vma_node_is_allowed(node, priv)) {