From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 05/30] drm/i915: Mark up address spaces that may need to allocate
Date: Wed, 2 Oct 2019 16:47:57 +0100 [thread overview]
Message-ID: <e3ee119b-4550-1d4e-a185-e59b76c499b9@linux.intel.com> (raw)
In-Reply-To: <20191002112000.12280-5-chris@chris-wilson.co.uk>
On 02/10/2019 12:19, Chris Wilson wrote:
> Since we cannot allocate underneath the vm->mutex (it is used in the
> direct-reclaim paths), we need to shift the allocations off into a
> mutexless worker with fence recursion prevention. To know when we need
> this protection, we mark up the address spaces that do allocate before
> insertion. In the future, we may wish to extend the async bind scheme to
> more than just allocations.
>
> v2: s/vm->bind_alloc/vm->bind_async_flags/
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +++
> drivers/gpu/drm/i915/i915_gem_gtt.h | 2 ++
> 2 files changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index ad9eb2d68f3f..8eba63ecdb03 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -1502,6 +1502,7 @@ static struct i915_ppgtt *gen8_ppgtt_create(struct drm_i915_private *i915)
> goto err_free_pd;
> }
>
> + ppgtt->vm.bind_async_flags = I915_VMA_LOCAL_BIND;
> ppgtt->vm.insert_entries = gen8_ppgtt_insert;
> ppgtt->vm.allocate_va_range = gen8_ppgtt_alloc;
> ppgtt->vm.clear_range = gen8_ppgtt_clear;
> @@ -1950,6 +1951,7 @@ static struct i915_ppgtt *gen6_ppgtt_create(struct drm_i915_private *i915)
> ppgtt_init(&ppgtt->base, &i915->gt);
> ppgtt->base.vm.top = 1;
>
> + ppgtt->base.vm.bind_async_flags = I915_VMA_LOCAL_BIND;
> ppgtt->base.vm.allocate_va_range = gen6_alloc_va_range;
> ppgtt->base.vm.clear_range = gen6_ppgtt_clear_range;
> ppgtt->base.vm.insert_entries = gen6_ppgtt_insert_entries;
> @@ -2581,6 +2583,7 @@ static int init_aliasing_ppgtt(struct i915_ggtt *ggtt)
> goto err_ppgtt;
>
> ggtt->alias = ppgtt;
> + ggtt->vm.bind_async_flags |= ppgtt->vm.bind_async_flags;
>
> GEM_BUG_ON(ggtt->vm.vma_ops.bind_vma != ggtt_bind_vma);
> ggtt->vm.vma_ops.bind_vma = aliasing_gtt_bind_vma;
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h
> index bbdc735466c1..3502b9c85a8e 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.h
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h
> @@ -305,6 +305,8 @@ struct i915_address_space {
> u64 total; /* size addr space maps (ex. 2GB for ggtt) */
> u64 reserved; /* size addr space reserved */
>
> + unsigned int bind_async_flags;
> +
> bool closed;
>
> struct mutex mutex; /* protects vma and our lists */
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-10-02 15:48 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-02 11:19 [PATCH 01/30] drm/i915/selftests: Exercise potential false lite-restore Chris Wilson
2019-10-02 11:19 ` [PATCH 02/30] dma-fence: Serialise signal enabling (dma_fence_enable_sw_signaling) Chris Wilson
2019-10-02 11:19 ` [PATCH 03/30] drm/mm: Pack allocated/scanned boolean into a bitfield Chris Wilson
2019-10-02 11:19 ` [PATCH 04/30] drm/i915: Only track bound elements of the GTT Chris Wilson
2019-10-02 11:19 ` [PATCH 05/30] drm/i915: Mark up address spaces that may need to allocate Chris Wilson
2019-10-02 15:47 ` Tvrtko Ursulin [this message]
2019-10-02 11:19 ` [PATCH 06/30] drm/i915: Pull i915_vma_pin under the vm->mutex Chris Wilson
2019-10-02 11:19 ` [PATCH 07/30] drm/i915: Push the i915_active.retire into a worker Chris Wilson
2019-10-02 11:19 ` [PATCH 08/30] drm/i915: Coordinate i915_active with its own mutex Chris Wilson
2019-10-02 15:49 ` Tvrtko Ursulin
2019-10-02 11:19 ` [PATCH 09/30] drm/i915: Move idle barrier cleanup into engine-pm Chris Wilson
2019-10-02 11:19 ` [PATCH 10/30] drm/i915: Drop struct_mutex from around i915_retire_requests() Chris Wilson
2019-10-02 11:19 ` [PATCH 11/30] drm/i915: Remove the GEM idle worker Chris Wilson
2019-10-02 11:19 ` [PATCH 12/30] drm/i915: Merge wait_for_timelines with retire_request Chris Wilson
2019-10-02 11:19 ` [PATCH 13/30] drm/i915/gem: Retire directly for mmap-offset shrinking Chris Wilson
2019-10-02 15:53 ` Tvrtko Ursulin
2019-10-02 11:19 ` [PATCH 14/30] drm/i915: Move request runtime management onto gt Chris Wilson
2019-10-02 15:58 ` Tvrtko Ursulin
2019-10-02 11:19 ` [PATCH 15/30] drm/i915: Move global activity tracking from GEM to GT Chris Wilson
2019-10-02 11:19 ` [PATCH 16/30] drm/i915: Expose engine properties via sysfs Chris Wilson
2019-10-02 11:19 ` [PATCH 17/30] drm/i915/execlists: Force preemption Chris Wilson
2019-10-02 11:19 ` [PATCH 18/30] drm/i915: Mark up "sentinel" requests Chris Wilson
2019-10-02 11:19 ` [PATCH 19/30] drm/i915/execlists: Cancel banned contexts on schedule-out Chris Wilson
2019-10-02 11:19 ` [PATCH 20/30] drm/i915: Cancel non-persistent contexts on close Chris Wilson
2019-10-02 13:52 ` Bloomfield, Jon
2019-10-02 14:05 ` Chris Wilson
2019-10-02 14:23 ` Chris Wilson
2019-10-02 14:40 ` Bloomfield, Jon
2019-10-02 14:23 ` [PATCH v2] " Chris Wilson
2019-10-02 14:36 ` Bloomfield, Jon
2019-10-02 11:19 ` [PATCH 21/30] drm/i915: Replace hangcheck by heartbeats Chris Wilson
2019-10-02 13:55 ` Bloomfield, Jon
2019-10-02 14:28 ` Chris Wilson
2019-10-02 11:19 ` [PATCH 22/30] drm/i915: Remove logical HW ID Chris Wilson
2019-10-02 16:07 ` Tvrtko Ursulin
2019-10-02 11:19 ` [PATCH 23/30] drm/i915: Move context management under GEM Chris Wilson
2019-10-02 11:19 ` [PATCH 24/30] drm/i915/overlay: Drop struct_mutex guard Chris Wilson
2019-10-02 11:19 ` [PATCH 25/30] drm/i915: Drop struct_mutex guard from debugfs/framebuffer_info Chris Wilson
2019-10-02 11:19 ` [PATCH 26/30] drm/i915: Remove struct_mutex guard for debugfs/opregion Chris Wilson
2019-10-02 11:19 ` [PATCH 27/30] drm/i915: Drop struct_mutex from suspend state save/restore Chris Wilson
2019-10-02 11:19 ` [PATCH 28/30] drm/i915/selftests: Drop vestigal struct_mutex guards Chris Wilson
2019-10-02 11:19 ` [PATCH 29/30] drm/i915: Drop struct_mutex from around GEM initialisation Chris Wilson
2019-10-02 11:20 ` [PATCH 30/30] drm/i915: Flush idle barriers when waiting Chris Wilson
2019-10-02 13:21 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/30] drm/i915/selftests: Exercise potential false lite-restore Patchwork
2019-10-02 13:34 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-10-02 13:46 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-10-02 13:49 ` Chris Wilson
2019-10-02 20:16 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/30] drm/i915/selftests: Exercise potential false lite-restore (rev2) Patchwork
2019-10-02 20:29 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-10-02 20:41 ` ✗ Fi.CI.BAT: 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=e3ee119b-4550-1d4e-a185-e59b76c499b9@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/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.