From: Daniel Vetter <daniel@ffwll.ch>
To: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Move vm page allocation in proper place
Date: Fri, 10 Apr 2015 16:20:57 +0200 [thread overview]
Message-ID: <20150410142057.GN6092@phenom.ffwll.local> (raw)
In-Reply-To: <1428670498-16532-1-git-send-email-mika.kuoppala@intel.com>
On Fri, Apr 10, 2015 at 03:54:58PM +0300, Mika Kuoppala wrote:
> Move to i915_vma_bind as it is part of the binding.
>
> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michel Thierry <michel.thierry@intel.com>
> Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_gem.c | 11 -----------
> drivers/gpu/drm/i915/i915_gem_gtt.c | 16 +++++++++++++++-
> 2 files changed, 15 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 9fbc355..c1dbdc4 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3550,17 +3550,6 @@ search_free:
> if (ret)
> goto err_remove_node;
>
> - /* allocate before insert / bind */
> - if (vma->vm->allocate_va_range) {
> - trace_i915_va_alloc(vma->vm, vma->node.start, vma->node.size,
> - VM_TO_TRACE_NAME(vma->vm));
> - ret = vma->vm->allocate_va_range(vma->vm,
> - vma->node.start,
> - vma->node.size);
> - if (ret)
> - goto err_remove_node;
> - }
> -
> trace_i915_vma_bind(vma, flags);
> ret = i915_vma_bind(vma, obj->cache_level,
> flags & PIN_GLOBAL ? GLOBAL_BIND : 0);
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index 19f84c5..4517de7 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -2936,8 +2936,22 @@ i915_get_ggtt_vma_pages(struct i915_vma *vma)
> int i915_vma_bind(struct i915_vma *vma, enum i915_cache_level cache_level,
> u32 flags)
> {
> + int ret;
> +
> + if (vma->vm->allocate_va_range) {
> + trace_i915_va_alloc(vma->vm, vma->node.start,
> + vma->node.size,
> + VM_TO_TRACE_NAME(vma->vm));
> +
> + ret = vma->vm->allocate_va_range(vma->vm,
> + vma->node.start,
> + vma->node.size);
> + if (ret)
> + return ret;
> + }
> +
> if (i915_is_ggtt(vma->vm)) {
> - int ret = i915_get_ggtt_vma_pages(vma);
> + ret = i915_get_ggtt_vma_pages(vma);
>
> if (ret)
> return ret;
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-04-10 14:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 12:54 [PATCH] drm/i915: Move vm page allocation in proper place Mika Kuoppala
2015-04-10 14:20 ` Daniel Vetter [this message]
2015-04-10 15:55 ` shuang.he
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=20150410142057.GN6092@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox