From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
matthew.auld@intel.com
Subject: [Intel-gfx] [PATCH v7 3/6] drm/i915: Don't pin the object pages during pending vma binds
Date: Mon, 10 Jan 2022 18:22:16 +0100 [thread overview]
Message-ID: <20220110172219.107131-4-thomas.hellstrom@linux.intel.com> (raw)
In-Reply-To: <20220110172219.107131-1-thomas.hellstrom@linux.intel.com>
A pin-count is already held by vma->pages so taking an additional pin
during async binds is not necessary.
When we introduce async unbinding we have other means of keeping the
object pages alive.
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/i915/i915_vma.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 42fff9ddf096..29c770a764aa 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -306,10 +306,8 @@ static void __vma_release(struct dma_fence_work *work)
{
struct i915_vma_work *vw = container_of(work, typeof(*vw), base);
- if (vw->pinned) {
- __i915_gem_object_unpin_pages(vw->pinned);
+ if (vw->pinned)
i915_gem_object_put(vw->pinned);
- }
i915_vm_free_pt_stash(vw->vm, &vw->stash);
i915_vm_put(vw->vm);
@@ -478,7 +476,6 @@ int i915_vma_bind(struct i915_vma *vma,
work->base.dma.error = 0; /* enable the queue_work() */
- __i915_gem_object_pin_pages(vma->obj);
work->pinned = i915_gem_object_get(vma->obj);
} else {
if (vma->obj) {
--
2.31.1
WARNING: multiple messages have this Message-ID (diff)
From: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>
To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: "Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
matthew.auld@intel.com
Subject: [PATCH v7 3/6] drm/i915: Don't pin the object pages during pending vma binds
Date: Mon, 10 Jan 2022 18:22:16 +0100 [thread overview]
Message-ID: <20220110172219.107131-4-thomas.hellstrom@linux.intel.com> (raw)
In-Reply-To: <20220110172219.107131-1-thomas.hellstrom@linux.intel.com>
A pin-count is already held by vma->pages so taking an additional pin
during async binds is not necessary.
When we introduce async unbinding we have other means of keeping the
object pages alive.
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/i915/i915_vma.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
index 42fff9ddf096..29c770a764aa 100644
--- a/drivers/gpu/drm/i915/i915_vma.c
+++ b/drivers/gpu/drm/i915/i915_vma.c
@@ -306,10 +306,8 @@ static void __vma_release(struct dma_fence_work *work)
{
struct i915_vma_work *vw = container_of(work, typeof(*vw), base);
- if (vw->pinned) {
- __i915_gem_object_unpin_pages(vw->pinned);
+ if (vw->pinned)
i915_gem_object_put(vw->pinned);
- }
i915_vm_free_pt_stash(vw->vm, &vw->stash);
i915_vm_put(vw->vm);
@@ -478,7 +476,6 @@ int i915_vma_bind(struct i915_vma *vma,
work->base.dma.error = 0; /* enable the queue_work() */
- __i915_gem_object_pin_pages(vma->obj);
work->pinned = i915_gem_object_get(vma->obj);
} else {
if (vma->obj) {
--
2.31.1
next prev parent reply other threads:[~2022-01-10 17:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-10 17:22 [Intel-gfx] [PATCH v7 0/6] drm/i915: Asynchronous vma unbinding Thomas Hellström
2022-01-10 17:22 ` Thomas Hellström
2022-01-10 17:22 ` [Intel-gfx] [PATCH v7 1/6] drm/i915: Initial introduction of vma resources Thomas Hellström
2022-01-10 17:22 ` Thomas Hellström
2022-01-10 17:22 ` [Intel-gfx] [PATCH v7 2/6] drm/i915: Use the vma resource as argument for gtt binding / unbinding Thomas Hellström
2022-01-10 17:22 ` Thomas Hellström
2022-01-10 17:22 ` Thomas Hellström [this message]
2022-01-10 17:22 ` [PATCH v7 3/6] drm/i915: Don't pin the object pages during pending vma binds Thomas Hellström
2022-01-10 17:22 ` [Intel-gfx] [PATCH v7 4/6] drm/i915: Use vma resources for async unbinding Thomas Hellström
2022-01-10 17:22 ` Thomas Hellström
2022-01-17 21:07 ` [Intel-gfx] " Robert Beckett
2022-01-18 9:06 ` Thomas Hellström
2022-01-10 17:22 ` [Intel-gfx] [PATCH v7 5/6] drm/i915: Asynchronous migration selftest Thomas Hellström
2022-01-10 17:22 ` Thomas Hellström
2022-01-10 17:22 ` [Intel-gfx] [PATCH v7 6/6] drm/i915: Use struct vma_resource instead of struct vma_snapshot Thomas Hellström
2022-01-10 17:22 ` Thomas Hellström
2022-01-10 21:10 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Asynchronous vma unbinding (rev7) Patchwork
2022-01-10 21:12 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-01-10 21:42 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-01-11 4:07 ` [Intel-gfx] ✓ Fi.CI.IGT: " 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=20220110172219.107131-4-thomas.hellstrom@linux.intel.com \
--to=thomas.hellstrom@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@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.