]> Git Repo - J-linux.git/commitdiff
drm/i915/gem: Do not look for the exact address in node
authorAndi Shyti <[email protected]>
Wed, 7 Aug 2024 10:05:20 +0000 (11:05 +0100)
committerAndi Shyti <[email protected]>
Wed, 21 Aug 2024 13:28:33 +0000 (15:28 +0200)
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 <[email protected]>
Reviewed-by: Nirmoy Das <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/i915/gem/i915_gem_mman.c

index e9b2424156f07c1266c8622cf3a2110ed773a4ba..99fde0a05632597ddb85c43437c4127a763d8252 100644 (file)
@@ -1079,9 +1079,9 @@ 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,
-                                                 vma->vm_pgoff,
-                                                 vma_pages(vma));
+       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)) {
                /*
                 * Skip 0-refcnted objects as it is in the process of being
This page took 0.070932 seconds and 4 git commands to generate.