All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Shyti <andi.shyti@linux.intel.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com>,
	Chris Wilson <chris.p.wilson@linux.intel.com>,
	Nirmoy Das <nirmoy.das@intel.com>,
	Krzysztof Niemiec <krzysztof.niemiec@intel.com>,
	Sima <daniel.vetter@ffwll.ch>,
	Matthew Brost <matthew.brost@intel.com>,
	Andi Shyti <andi.shyti@linux.intel.com>
Subject: [PATCH v2 1/2] drm/i915/gem: Do not look for the exact address in node
Date: Wed, 14 Aug 2024 15:48:33 +0200	[thread overview]
Message-ID: <20240814134837.116498-2-andi.shyti@linux.intel.com> (raw)
In-Reply-To: <20240814134837.116498-1-andi.shyti@linux.intel.com>

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>
---
 drivers/gpu/drm/i915/gem/i915_gem_mman.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
index e9b2424156f0..99fde0a05632 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
@@ -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
-- 
2.45.2


  reply	other threads:[~2024-08-14 13:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-14 13:48 [PATCH v2 0/2] Allow partial memory mapping for cpu memory Andi Shyti
2024-08-14 13:48 ` Andi Shyti [this message]
2024-08-14 13:48 ` [PATCH v2 2/2] drm/i915/gem: Calculate object page offset for partial memory mapping Andi Shyti
2024-08-14 13:48 ` [PATCH v2 0/2] Allow partial memory mapping for cpu memory Andi Shyti
2024-08-14 13:48 ` [PATCH v2 1/2] drm/i915/gem: Do not look for the exact address in node Andi Shyti
2024-08-14 13:48 ` [PATCH v2 2/2] drm/i915/gem: Calculate object page offset for partial memory mapping Andi Shyti
2024-08-14 13:51 ` [PATCH v2 0/2] Allow partial memory mapping for cpu memory Andi Shyti
2024-08-14 14:49 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-08-14 16:07 ` [PATCH v2 0/2] " Matthew Brost
2024-08-19 15:16   ` Andi Shyti
2024-08-19 16:53     ` Matthew Brost
2024-08-22  9:49       ` Daniel Vetter
2024-08-14 18:29 ` ✗ Fi.CI.IGT: failure for " Patchwork
2024-08-14 22:12 ` ✓ Fi.CI.BAT: success for Allow partial memory mapping for cpu memory (rev2) Patchwork
2024-08-16  5:25 ` ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240814134837.116498-2-andi.shyti@linux.intel.com \
    --to=andi.shyti@linux.intel.com \
    --cc=chris.p.wilson@linux.intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=krzysztof.niemiec@intel.com \
    --cc=lionel.g.landwerlin@intel.com \
    --cc=matthew.brost@intel.com \
    --cc=nirmoy.das@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.